home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / lang / Python16_Src.lha / Python16_Source / Misc / HISTORY < prev    next >
Encoding:
Text File  |  2000-09-02  |  294.2 KB  |  7,873 lines

  1. Python history
  2. --------------
  3.  
  4. This file contains the release messages for previous Python releases.
  5. As you read on you go back to the dark ages of Python's history.
  6.  
  7.  
  8. ======================================================================
  9.  
  10.  
  11. From 1.5.2c1 to 1.5.2 (final)
  12. =============================
  13.  
  14. Tue Apr 13 15:44:49 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  15.  
  16.     * PCbuild/python15.wse: Bump version to 1.5.2 (final)
  17.  
  18.     * PCbuild/python15.dsp: Added shamodule.c
  19.  
  20.     * PC/config.c: Added sha module!
  21.  
  22.     * README, Include/patchlevel.h: Prepare for final release.
  23.  
  24.     * Misc/ACKS:
  25.     More (Cameron Laird is honorary; the others are 1.5.2c1 testers).
  26.  
  27.     * Python/thread_solaris.h:
  28.     While I can't really test this thoroughly, Pat Knight and the Solaris
  29.     man pages suggest that the proper thing to do is to add THR_NEW_LWP to
  30.     the flags on thr_create(), and that there really isn't a downside, so
  31.     I'll do that.
  32.  
  33.     * Misc/ACKS:
  34.     Bunch of new names who helped iron out the last wrinkles of 1.5.2.
  35.  
  36.     * PC/python_nt.rc:
  37.     Bump the myusterious M$ version number from 1,5,2,1 to 1,5,2,3.
  38.     (I can't even display this on NT, maybe Win/98 can?)
  39.  
  40.     * Lib/pstats.py:
  41.     Fix mysterious references to jprofile that were in the source since
  42.     its creation.  I'm assuming these were once valid references to "Jim
  43.     Roskind's profile"...
  44.  
  45.     * Lib/Attic/threading_api.py:
  46.     Removed; since long subsumed in Doc/lib/libthreading.tex
  47.  
  48.     * Modules/socketmodule.c:
  49.     Put back __osf__ support for gethostbyname_r(); the real bug was that
  50.     it was being used even without threads.  This of course might be an
  51.     all-platform problem so now we only use the _r variant when we are
  52.     using threads.
  53.  
  54. Mon Apr 12 22:51:20 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  55.  
  56.     * Modules/cPickle.c:
  57.     Fix accidentally reversed NULL test in load_mark().  Suggested by
  58.     Tamito Kajiyama.  (This caused a bug only on platforms where malloc(0)
  59.     returns NULL.)
  60.  
  61.     * README:
  62.     Add note about popen2 problem on Linux noticed by Pablo Bleyer.
  63.  
  64.     * README: Add note about -D_REENTRANT for HP-UX 10.20.
  65.  
  66.     * Modules/Makefile.pre.in: 'clean' target should remove hassignal.
  67.  
  68.     * PC/Attic/vc40.mak, PC/readme.txt:
  69.     Remove all VC++ info (except VC 1.5) from readme.txt;
  70.     remove the VC++ 4.0 project file; remove the unused _tkinter extern defs.
  71.  
  72.     * README: Clarify PC build instructions (point to PCbuild).
  73.  
  74.     * Modules/zlibmodule.c: Cast added by Jack Jansen (for Mac port).
  75.  
  76.     * Lib/plat-sunos5/CDIO.py, Lib/plat-linux2/CDROM.py:
  77.     Forgot to add this file.  CDROM device parameters.
  78.  
  79.     * Lib/gzip.py: Two different changes.
  80.  
  81.     1. Jack Jansen reports that on the Mac, the time may be negative, and
  82.     solves this by adding a write32u() function that writes an unsigned
  83.     long.
  84.  
  85.     2. On 64-bit platforms the CRC comparison fails; I've fixed this by
  86.     casting both values to be compared to "unsigned long" i.e. modulo
  87.     0x100000000L.
  88.  
  89. Sat Apr 10 18:42:02 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  90.  
  91.     * PC/Attic/_tkinter.def: No longer needed.
  92.  
  93.     * Misc/ACKS: Correct missed character in Andrew Dalke's name.
  94.  
  95.     * README: Add DEC Ultrix notes (from Donn Cave's email).
  96.  
  97.     * configure: The usual
  98.  
  99.     * configure.in:
  100.     Quote a bunch of shell variables used in test, related to long-long.
  101.  
  102.     * Objects/fileobject.c, Modules/shamodule.c, Modules/regexpr.c:
  103.     casts for picky compilers.
  104.  
  105.     * Modules/socketmodule.c:
  106.     3-arg gethostbyname_r doesn't really work on OSF/1.
  107.  
  108.     * PC/vc15_w31/_.c, PC/vc15_lib/_.c, Tools/pynche/__init__.py:
  109.     Avoid totally empty files.
  110.  
  111. Fri Apr  9 14:56:35 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  112.  
  113.     * Tools/scripts/fixps.py: Use re instead of regex.
  114.     Don't rewrite the file in place.
  115.     (Reported by Andy Dustman.)
  116.  
  117.     * Lib/netrc.py, Lib/shlex.py: Get rid of #! line
  118.  
  119. Thu Apr  8 23:13:37 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  120.  
  121.     * PCbuild/python15.wse: Use the Tcl 8.0.5 installer.
  122.     Add a variable %_TCL_% that makes it easier to switch to a different version.
  123.  
  124.  
  125. ======================================================================
  126.  
  127.  
  128. From 1.5.2b2 to 1.5.2c1
  129. =======================
  130.  
  131. Thu Apr  8 23:13:37 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  132.  
  133.     * PCbuild/python15.wse:
  134.     Release 1.5.2c1.  Add IDLE and Uninstall to program group.
  135.     Don't distribute zlib.dll.  Tweak some comments.
  136.  
  137.     * PCbuild/zlib.dsp: Now using static zlib 1.1.3
  138.  
  139.     * Lib/dos-8x3/userdict.py, Lib/dos-8x3/userlist.py, Lib/dos-8x3/test_zli.py, Lib/dos-8x3/test_use.py, Lib/dos-8x3/test_pop.py, Lib/dos-8x3/test_pic.py, Lib/dos-8x3/test_ntp.py, Lib/dos-8x3/test_gzi.py, Lib/dos-8x3/test_fcn.py, Lib/dos-8x3/test_cpi.py, Lib/dos-8x3/test_bsd.py, Lib/dos-8x3/posixfil.py, Lib/dos-8x3/mimetype.py, Lib/dos-8x3/nturl2pa.py, Lib/dos-8x3/compilea.py, Lib/dos-8x3/exceptio.py, Lib/dos-8x3/basehttp.py:
  140.     The usual
  141.  
  142.     * Include/patchlevel.h: Release 1.5.2c1
  143.  
  144.     * README: Release 1.5.2c1.
  145.  
  146.     * Misc/NEWS: News for the 1.5.2c1 release.
  147.  
  148.     * Lib/test/test_strftime.py:
  149.     On Windows, we suddenly find, strftime() may return "" for an
  150.     unsupported format string.  (I guess this is because the logic for
  151.     deciding whether to reallocate the buffer or not has been improved.)
  152.     This caused the test code to crash on result[0].  Fix this by assuming
  153.     an empty result also means the format is not supported.
  154.  
  155.     * Demo/tkinter/matt/window-creation-w-location.py:
  156.     This demo imported some private code from Matt.  Make it cripple along.
  157.  
  158.     * Lib/lib-tk/Tkinter.py:
  159.     Delete an accidentally checked-in feature that actually broke more
  160.     than was worth it: when deleting a canvas item, it would try to
  161.     automatically delete the bindings for that item.  Since there's
  162.     nothing that says you can't reuse the tag and still have the bindings,
  163.     this is not correct.  Also, it broke at least one demo
  164.     (Demo/tkinter/matt/rubber-band-box-demo-1.py).
  165.  
  166.     * Python/thread_wince.h: Win/CE thread support by Mark Hammond.
  167.  
  168. Wed Apr  7 20:23:17 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  169.  
  170.     * Modules/zlibmodule.c:
  171.     Patch by Andrew Kuchling to unflush() (flush() for deflating).
  172.     Without this, if inflate() returned Z_BUF_ERROR asking for more output
  173.     space, we would report the error; now, we increase the buffer size and
  174.     try again, just as for Z_OK.
  175.  
  176.     * Lib/test/test_gzip.py: Use binary mode for all gzip files we open.
  177.  
  178.     * Tools/idle/ChangeLog: New change log.
  179.  
  180.     * Tools/idle/README.txt, Tools/idle/NEWS.txt: New version.
  181.  
  182.     * Python/pythonrun.c:
  183.     Alas, get rid of the Win specific hack to ask the user to press Return
  184.     before exiting when an error happened.  This didn't work right when
  185.     Python is invoked from a daemon.
  186.  
  187.     * Tools/idle/idlever.py: Version bump awaiting impending new release.
  188.     (Not much has changed :-( )
  189.  
  190.     * Lib/lib-tk/Tkinter.py:
  191.     lower, tkraise/lift hide Misc.lower, Misc.tkraise/lift,
  192.     so the preferred name for them is tag_lower, tag_raise
  193.     (similar to tag_bind, and similar to the Text widget);
  194.     unfortunately can't delete the old ones yet (maybe in 1.6)
  195.  
  196.     * Python/thread.c, Python/strtod.c, Python/mystrtoul.c, Python/import.c, Python/ceval.c:
  197.     Changes by Mark Hammond for Windows CE.  Mostly of the form
  198.       #ifdef DONT_HAVE_header_H ... #endif around #include <header.h>.
  199.  
  200.     * Python/bltinmodule.c:
  201.     Remove unused variable from complex_from_string() code.
  202.  
  203.     * Include/patchlevel.h:
  204.     Add the possibility of a gamma release (release candidate).
  205.     Add '+' to string version number to indicate we're beyond b2 now.
  206.  
  207.     * Modules/posixmodule.c: Add extern decl for fsync() for SunOS 4.x.
  208.  
  209.     * Lib/smtplib.py: Changes by Per Cederquist and The Dragon.
  210.  
  211.     Per writes:
  212.  
  213.     """
  214.     The application where Signum Support uses smtplib needs to be able to
  215.     report good error messages to the user when sending email fails.  To
  216.     help in diagnosing problems it is useful to be able to report the
  217.     entire message sent by the server, not only the SMTP error code of the
  218.     offending command.
  219.  
  220.     A lot of the functions in sendmail.py unfortunately discards the
  221.     message, leaving only the code.  The enclosed patch fixes that
  222.     problem.
  223.  
  224.     The enclosed patch also introduces a base class for exceptions that
  225.     include an SMTP error code and error message, and make the code and
  226.     message available on separate attributes, so that surrounding code can
  227.     deal with them in whatever way it sees fit.  I've also added some
  228.     documentation to the exception classes.
  229.  
  230.     The constructor will now raise an exception if it cannot connect to
  231.     the SMTP server.
  232.  
  233.     The data() method will raise an SMTPDataError if it doesn't receive
  234.     the expected 354 code in the middle of the exchange.
  235.  
  236.     According to section 5.2.10 of RFC 1123 a smtp client must accept "any
  237.     text, including no text at all" after the error code.  If the response
  238.     of a HELO command contains no text self.helo_resp will be set to the
  239.     empty string ("").  The patch fixes the test in the sendmail() method
  240.     so that helo_resp is tested against None; if it has the empty string
  241.     as value the sendmail() method would invoke the helo() method again.
  242.  
  243.     The code no longer accepts a -1 reply from the ehlo() method in
  244.     sendmail().
  245.  
  246.     [Text about removing SMTPRecipientsRefused deleted --GvR]
  247.     """
  248.  
  249.     and also:
  250.  
  251.     """
  252.     smtplib.py appends an extra blank line to the outgoing mail if the
  253.     `msg' argument to the sendmail method already contains a trailing
  254.     newline.  This patch should fix the problem.
  255.     """
  256.  
  257.     The Dragon writes:
  258.  
  259.     """
  260.         Mostly I just re-added the SMTPRecipientsRefused exception
  261.     (the exeption object now has the appropriate info in it ) [Per had
  262.     removed this in his patch --GvR] and tweaked the behavior of the
  263.     sendmail method whence it throws the newly added SMTPHeloException (it
  264.     was closing the connection, which it shouldn't.  whatever catches the
  265.     exception should do that. )
  266.  
  267.         I pondered the change of the return values to tuples all around,
  268.     and after some thinking I decided that regularizing the return values was
  269.     too much of the Right Thing (tm) to not do.
  270.  
  271.         My one concern is that code expecting an integer & getting a tuple
  272.     may fail silently.
  273.  
  274.     (i.e. if it's doing :
  275.  
  276.           x.somemethod() >= 400:
  277.     expecting an integer, the expression will always be true if it gets a
  278.     tuple instead. )
  279.  
  280.         However, most smtplib code I've seen only really uses the
  281.     sendmail() method, so this wouldn't bother it.  Usually code I've seen
  282.     that calls the other methods usually only calls helo() and ehlo() for
  283.     doing ESMTP, a feature which was not in the smtplib included with 1.5.1,
  284.     and thus I would think not much code uses it yet.
  285.     """
  286.  
  287. Tue Apr  6 19:38:18 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  288.  
  289.     * Lib/test/test_ntpath.py:
  290.     Fix the tests now that splitdrive() no longer treats UNC paths special.
  291.     (Some tests converted to splitunc() tests.)
  292.  
  293.     * Lib/ntpath.py:
  294.     Withdraw the UNC support from splitdrive().  Instead, a new function
  295.     splitunc() parses UNC paths.  The contributor of the UNC parsing in
  296.     splitdrive() doesn't like it, but I haven't heard a good reason to
  297.     keep it, and it causes some problems.  (I think there's a
  298.     philosophical problem -- to me, the split*() functions are purely
  299.     syntactical, and the fact that \\foo is not a valid path doesn't mean
  300.     that it shouldn't be considered an absolute path.)
  301.  
  302.     Also (quite separately, but strangely related to the philosophical
  303.     issue above) fix abspath() so that if win32api exists, it doesn't fail
  304.     when the path doesn't actually exist -- if GetFullPathName() fails,
  305.     fall back on the old strategy (join with getcwd() if neccessary, and
  306.     then use normpath()).
  307.  
  308.     * configure.in, configure, config.h.in, acconfig.h:
  309.     For BeOS PowerPC.  Chris Herborth.
  310.  
  311. Mon Apr  5 21:54:14 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  312.  
  313.     * Modules/timemodule.c:
  314.     Jonathan Giddy notes, and Chris Lawrence agrees, that some comments on
  315.     #else/#endif are wrong, and that #if HAVE_TM_ZONE should be #ifdef.
  316.  
  317.     * Misc/ACKS:
  318.     Bunch of new contributors, including 9 who contributed to the Docs,
  319.     reported by Fred.
  320.  
  321. Mon Apr  5 18:37:59 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  322.  
  323.     * Lib/gzip.py:
  324.     Oops, missed mode parameter to open().
  325.  
  326.     * Lib/gzip.py:
  327.     Made the default mode 'rb' instead of 'r', for better cross-platform
  328.     support.  (Based on comment on the documentation by Bernhard Reiter
  329.     <bernhard@csd.uwm.edu>).
  330.  
  331. Fri Apr  2 22:18:25 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  332.  
  333.     * Tools/scripts/dutree.py:
  334.     For reasons I dare not explain, this script should always execute
  335.     main() when imported (in other words, it is not usable as a module).
  336.  
  337. Thu Apr  1 15:32:30 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  338.  
  339.     * Lib/test/test_cpickle.py: Jonathan Giddy write:
  340.  
  341.     In test_cpickle.py, the module os got imported, but the line to remove
  342.     the temp file has gone missing.
  343.  
  344. Tue Mar 30 20:17:31 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  345.  
  346.     * Lib/BaseHTTPServer.py: Per Cederqvist writes:
  347.  
  348.     If you send something like "PUT / HTTP/1.0" to something derived from
  349.     BaseHTTPServer that doesn't define do_PUT, you will get a response
  350.     that begins like this:
  351.  
  352.         HTTP/1.0 501 Unsupported method ('do_PUT')
  353.         Server: SimpleHTTP/0.3 Python/1.5
  354.         Date: Tue, 30 Mar 1999 18:53:53 GMT
  355.  
  356.     The server should complain about 'PUT' instead of 'do_PUT'.  This
  357.     patch should fix the problem.
  358.  
  359. Mon Mar 29 20:33:21 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  360.  
  361.     * Lib/smtplib.py: Patch by Per Cederqvist, who writes:
  362.  
  363.     """
  364.      - It needlessly used the makefile() method for each response that is
  365.        read from the SMTP server.
  366.  
  367.      - If the remote SMTP server closes the connection unexpectedly the
  368.        code raised an IndexError.  It now raises an SMTPServerDisconnected
  369.        exception instead.
  370.  
  371.      - The code now checks that all lines in a multiline response actually
  372.        contains an error code.
  373.     """
  374.  
  375.     The Dragon approves.
  376.  
  377. Mon Mar 29 20:25:40 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  378.  
  379.     * Lib/compileall.py:
  380.     When run as a script, report failures in the exit code as well.
  381.     Patch largely based on changes by Andrew Dalke, as discussed in the
  382.     distutils-sig.
  383.  
  384. Mon Mar 29 20:23:41 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  385.  
  386.     * Lib/urllib.py:
  387.     Hack so that if a 302 or 301 redirect contains a relative URL, the
  388.     right thing "just happens" (basejoin() with old URL).
  389.  
  390.     * Modules/cPickle.c:
  391.     Protection against picling to/from closed (real) file.
  392.     The problem was reported by Moshe Zadka.
  393.  
  394.     * Lib/test/test_cpickle.py:
  395.     Test protection against picling to/from closed (real) file.
  396.  
  397.     * Modules/timemodule.c: Chris Lawrence writes:
  398.  
  399.     """
  400.     The GNU folks, in their infinite wisdom, have decided not to implement
  401.     altzone in libc6; this would not be horrible, except that timezone
  402.     (which is implemented) includes the current DST setting (i.e. timezone
  403.     for Central is 18000 in summer and 21600 in winter).  So Python's
  404.     timezone and altzone variables aren't set correctly during DST.
  405.  
  406.     Here's a patch relative to 1.5.2b2 that (a) makes timezone and altzone
  407.     show the "right" thing on Linux (by using the tm_gmtoff stuff
  408.     available in BSD, which is how the GLIBC manual claims things should
  409.     be done) and (b) should cope with the southern hemisphere.  In pursuit
  410.     of (b), I also took the liberty of renaming the "summer" and "winter"
  411.     variables to "july" and "jan".  This patch should also make certain
  412.     time calculations on Linux actually work right (like the tz-aware
  413.     functions in the rfc822 module).
  414.  
  415.     (It's hard to find DST that's currently being used in the southern
  416.     hemisphere; I tested using Africa/Windhoek.)
  417.     """
  418.  
  419.     * Lib/test/output/test_gzip:
  420.     Jonathan Giddy discovered this file was missing.
  421.  
  422.     * Modules/shamodule.c:
  423.     Avoid warnings from AIX compiler.  Reported by Vladimir (AIX is my
  424.     middlename) Marangozov, patch coded by Greg Stein.
  425.  
  426.     * Tools/idle/ScriptBinding.py, Tools/idle/PyShell.py:
  427.     At Tim Peters' recommendation, add a dummy flush() method to PseudoFile.
  428.  
  429. Sun Mar 28 17:55:32 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  430.  
  431.     * Tools/scripts/ndiff.py: Tim Peters writes:
  432.  
  433.     I should have waited overnight <wink/sigh>.  Nothing wrong with the one I
  434.     sent, but I couldn't resist going on to add new -r1 / -r2 cmdline options
  435.     for recreating the original files from ndiff's output.  That's attached, if
  436.     you're game!  Us Windows guys don't usually have a sed sitting around
  437.     <wink>.
  438.  
  439. Sat Mar 27 13:34:01 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  440.  
  441.     * Tools/scripts/ndiff.py: Tim Peters writes:
  442.  
  443.     Attached is a cleaned-up version of ndiff (added useful module
  444.     docstring, now echo'ed in case of cmd line mistake); added -q option
  445.     to suppress initial file identification lines; + other minor cleanups,
  446.     & a slightly faster match engine.
  447.  
  448. Fri Mar 26 22:36:00 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  449.  
  450.     * Tools/scripts/dutree.py:
  451.     During display, if EPIPE is raised, it's probably because a pager was
  452.     killed.  Discard the error in that case, but propogate it otherwise.
  453.  
  454. Fri Mar 26 16:20:45 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  455.  
  456.     * Lib/test/output/test_userlist, Lib/test/test_userlist.py:
  457.     Test suite for UserList.
  458.  
  459.     * Lib/UserList.py: Use isinstance() where appropriate.
  460.     Reformatted with 4-space indent.
  461.  
  462. Fri Mar 26 16:11:40 1999  Barry Warsaw  <bwarsaw@eric.cnri.reston.va.us>
  463.  
  464.     * Tools/pynche/PyncheWidget.py:
  465.     Helpwin.__init__(): The text widget should get focus.
  466.  
  467.     * Tools/pynche/pyColorChooser.py:
  468.     Removed unnecessary import `from PyncheWidget import PyncheWidget'
  469.  
  470. Fri Mar 26 15:32:05 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  471.  
  472.     * Lib/test/output/test_userdict, Lib/test/test_userdict.py:
  473.     Test suite for UserDict
  474.  
  475.     * Lib/UserDict.py: Improved a bunch of things.
  476.     The constructor now takes an optional dictionary.
  477.     Use isinstance() where appropriate.
  478.  
  479. Thu Mar 25 22:38:49 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  480.  
  481.     * Lib/test/output/test_pickle, Lib/test/output/test_cpickle, Lib/test/test_pickle.py, Lib/test/test_cpickle.py:
  482.     Basic regr tests for pickle/cPickle
  483.  
  484.     * Lib/pickle.py:
  485.     Don't use "exec" in find_class().  It's slow, unnecessary, and (as AMK
  486.     points out) it doesn't work in JPython Applets.
  487.  
  488. Thu Mar 25 21:50:27 1999  Andrew Kuchling  <akuchlin@eric.cnri.reston.va.us>
  489.  
  490.     * Lib/test/test_gzip.py:
  491.     Added a simple test suite for gzip.  It simply opens a temp file,
  492.     writes a chunk of compressed data, closes it, writes another chunk, and
  493.     reads the contents back to verify that they are the same.
  494.  
  495.     * Lib/gzip.py:
  496.     Based on a suggestion from bruce@hams.com, make a trivial change to
  497.     allow using the 'a' flag as a mode for opening a GzipFile.  gzip
  498.     files, surprisingly enough, can be concatenated and then decompressed;
  499.     the effect is to concatenate the two chunks of data.
  500.  
  501.     If we support it on writing, it should also be supported on reading.
  502.     This *wasn't* trivial, and required rearranging the code in the
  503.     reading path, particularly the _read() method.
  504.  
  505.     Raise IOError instead of RuntimeError in two cases, 'Not a gzipped file'
  506.     and 'Unknown compression method'
  507.  
  508. Thu Mar 25 21:25:01 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  509.  
  510.     * Lib/test/test_b1.py:
  511.     Add tests for float() and complex() with string args (Nick/Stephanie
  512.     Lockwood).
  513.  
  514. Thu Mar 25 21:21:08 1999  Andrew Kuchling  <akuchlin@eric.cnri.reston.va.us>
  515.  
  516.     * Modules/zlibmodule.c:
  517.     Add an .unused_data attribute to decompressor objects.  If .unused_data
  518.     is not an empty string, this means that you have arrived at the
  519.     end of the stream of compressed data, and the contents of .unused_data are
  520.     whatever follows the compressed stream.
  521.  
  522. Thu Mar 25 21:16:07 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  523.  
  524.     * Python/bltinmodule.c:
  525.     Patch by Nick and Stephanie Lockwood to implement complex() with a string
  526.     argument.  This closes TODO item 2.19.
  527.  
  528. Wed Mar 24 19:09:00 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  529.  
  530.     * Tools/webchecker/wcnew.py: Added Samuel Bayer's new webchecker.
  531.     Unfortunately his code breaks wcgui.py in a way that's not easy
  532.     to fix.  I expect that this is a temporary situation --
  533.     eventually Sam's changes will be merged back in.
  534.     (The changes add a -t option to specify exceptions to the -x
  535.     option, and explicit checking for #foo style fragment ids.)
  536.  
  537.     * Objects/dictobject.c:
  538.     Vladimir Marangozov contributed updated comments.
  539.  
  540.     * Objects/bufferobject.c: Folded long lines.
  541.  
  542.     * Lib/test/output/test_sha, Lib/test/test_sha.py:
  543.     Added Jeremy's test code for the sha module.
  544.  
  545.     * Modules/shamodule.c, Modules/Setup.in:
  546.     Added Greg Stein and Andrew Kuchling's sha module.
  547.     Fix comments about zlib version and URL.
  548.  
  549.     * Lib/test/test_bsddb.py: Remove the temp file when we're done.
  550.  
  551.     * Include/pythread.h: Conform to standard boilerplate.
  552.  
  553.     * configure.in, configure, BeOS/linkmodule, BeOS/ar-fake:
  554.     Chris Herborth: the new compiler in R4.1 needs some new options to work...
  555.  
  556.     * Modules/socketmodule.c:
  557.     Implement two suggestions by Jonathan Giddy: (1) in AIX, clear the
  558.     data struct before calling gethostby{name,addr}_r(); (2) ignore the
  559.     3/5/6 args determinations made by the configure script and switch on
  560.     platform identifiers instead:
  561.  
  562.     AIX, OSF have 3 args
  563.     Sun, SGI have 5 args
  564.     Linux has 6 args
  565.  
  566.     On all other platforms, undef HAVE_GETHOSTBYNAME_R altogether.
  567.  
  568.     * Modules/socketmodule.c:
  569.     Vladimir Marangozov implements the AIX 3-arg gethostbyname_r code.
  570.  
  571.     * Lib/mailbox.py:
  572.     Add readlines() to _Subfile class.  Not clear who would need it, but
  573.     Chris Lawrence sent me a broken version; this one is a tad simpler and
  574.     more conforming to the standard.
  575.  
  576. Tue Mar 23 23:05:34 1999  Jeremy Hylton  <jhylton@eric.cnri.reston.va.us>
  577.  
  578.     * Lib/gzip.py: use struct instead of bit-manipulate in Python
  579.  
  580. Tue Mar 23 19:00:55 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  581.  
  582.     * Modules/Makefile.pre.in:
  583.     Add $(EXE) to various occurrences of python so it will work on Cygwin
  584.     with egcs (after setting EXE=.exe).  Patch by Norman Vine.
  585.  
  586.     * configure, configure.in:
  587.     Ack!  It never defined HAVE_GETHOSTBYNAME_R so that code was never tested!
  588.  
  589. Mon Mar 22 22:25:39 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  590.  
  591.     * Include/thread.h:
  592.     Adding thread.h -- unused but for b/w compatibility.
  593.     As requested by Bill Janssen.
  594.  
  595.     * configure.in, configure:
  596.     Add code to test for all sorts of gethostbyname_r variants,
  597.     donated by David Arnold.
  598.  
  599.     * config.h.in, acconfig.h:
  600.     Add symbols for gethostbyname_r variants (sigh).
  601.  
  602.     * Modules/socketmodule.c: Clean up pass for the previous patches.
  603.  
  604.     - Use HAVE_GETHOSTBYNAME_R_6_ARG instead of testing for Linux and
  605.     glibc2.
  606.  
  607.     - If gethostbyname takes 3 args, undefine HAVE_GETHOSTBYNAME_R --
  608.     don't know what code should be used.
  609.  
  610.     - New symbol USE_GETHOSTBYNAME_LOCK defined iff the lock should be used.
  611.  
  612.     - Modify the gethostbyaddr() code to also hold on to the lock until
  613.     after it is safe to release, overlapping with the Python lock.
  614.  
  615.     (Note: I think that it could in theory be possible that Python code
  616.     executed while gethostbyname_lock is held could attempt to reacquire
  617.     the lock -- e.g. in a signal handler or destructor.  I will simply say
  618.     "don't do that then.")
  619.  
  620.     * Modules/socketmodule.c: Jonathan Giddy writes:
  621.  
  622.     Here's a patch to fix the race condition, which wasn't fixed by Rob's
  623.     patch.  It holds the gethostbyname lock until the results are copied out,
  624.     which means that this lock and the Python global lock are held at the same
  625.     time.  This shouldn't be a problem as long as the gethostbyname lock is
  626.     always acquired when the global lock is not held.
  627.  
  628. Mon Mar 22 19:25:30 1999  Andrew Kuchling  <akuchlin@eric.cnri.reston.va.us>
  629.  
  630.     * Modules/zlibmodule.c:
  631.     Fixed the flush() method of compression objects; the test for
  632.         the end of loop was incorrect, and failed when the flushmode != Z_FINISH.
  633.         Logic cleaned up and commented.
  634.  
  635.     * Lib/test/test_zlib.py:
  636.     Added simple test for the flush() method of compression objects, trying the
  637.         different flush values Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FULL_FLUSH.
  638.  
  639. Mon Mar 22 15:28:08 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  640.  
  641.     * Lib/shlex.py:
  642.     Bug reported by Tobias Thelen: missing "self." in assignment target.
  643.  
  644. Fri Mar 19 21:50:11 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  645.  
  646.     * Modules/arraymodule.c:
  647.     Use an unsigned cast to avoid a warning in VC++.
  648.  
  649.     * Lib/dospath.py, Lib/ntpath.py:
  650.     New code for split() by Tim Peters, behaves more like posixpath.split().
  651.  
  652.     * Objects/floatobject.c:
  653.     Fix a problem with Vladimir's PyFloat_Fini code: clear the free list; if
  654.     a block cannot be freed, add its free items back to the free list.
  655.     This is necessary to avoid leaking when Python is reinitialized later.
  656.  
  657.     * Objects/intobject.c:
  658.     Fix a problem with Vladimir's PyInt_Fini code: clear the free list; if
  659.     a block cannot be freed, add its free items back to the free list, and
  660.     add its valid ints back to the small_ints array if they are in range.
  661.     This is necessary to avoid leaking when Python is reinitialized later.
  662.  
  663.     * Lib/types.py:
  664.     Added BufferType, the type returned by the new builtin buffer().  Greg Stein.
  665.  
  666.     * Python/bltinmodule.c:
  667.     New builtin buffer() creates a derived read-only buffer from any
  668.     object that supports the buffer interface (e.g. strings, arrays).
  669.  
  670.     * Objects/bufferobject.c:
  671.     Added check for negative offset for PyBuffer_FromObject and check for
  672.     negative size for PyBuffer_FromMemory.  Greg Stein.
  673.  
  674. Thu Mar 18 15:10:44 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  675.  
  676.     * Lib/urlparse.py: Sjoerd Mullender writes:
  677.  
  678.     If a filename on Windows starts with \\, it is converted to a URL
  679.     which starts with ////.  If this URL is passed to urlparse.urlparse
  680.     you get a path that starts with // (and an empty netloc).  If you pass
  681.     the result back to urlparse.urlunparse, you get a URL that starts with
  682.     //, which is parsed differently by urlparse.urlparse.  The fix is to
  683.     add the (empty) netloc with accompanying slashes if the path in
  684.     urlunparse starts with //.  Do this for all schemes that use a netloc.
  685.  
  686.     * Lib/nturl2path.py: Sjoerd Mullender writes:
  687.  
  688.     Pathnames of files on other hosts in the same domain
  689.     (\\host\path\to\file) are not translated correctly to URLs and back.
  690.     The URL should be something like file:////host/path/to/file.
  691.     Note that a combination of drive letter and remote host is not
  692.     possible.
  693.  
  694. Wed Mar 17 22:30:10 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  695.  
  696.     * Lib/urlparse.py:
  697.     Delete non-standard-conforming code in urljoin() that would use the
  698.     netloc from the base url as the default netloc for the resulting url
  699.     even if the schemes differ.
  700.  
  701.     Once upon a time, when the web was wild, this was a valuable hack
  702.     because some people had a URL referencing an ftp server colocated with
  703.     an http server without having the host in the ftp URL (so they could
  704.     replicate it or change the hostname easily).
  705.  
  706.     More recently, after the file: scheme got added back to the list of
  707.     schemes that accept a netloc, it turns out that this caused weirdness
  708.     when joining an http: URL with a file: URL -- the resulting file: URL
  709.     would always inherit the host from the http: URL because the file:
  710.     scheme supports a netloc but in practice never has one.
  711.  
  712.     There are two reasons to get rid of the old, once-valuable hack,
  713.     instead of removing the file: scheme from the uses_netloc list.  One,
  714.     the RFC says that file: uses the netloc syntax, and does not endorse
  715.     the old hack.  Two, neither netscape 4.5 nor IE 4.0 support the old
  716.     hack.
  717.  
  718.     * Include/ceval.h, Include/abstract.h:
  719.     Add DLL level b/w compat for PySequence_In and PyEval_CallObject
  720.  
  721. Tue Mar 16 21:54:50 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  722.  
  723.     * Lib/lib-tk/Tkinter.py: Bug reported by Jim Robinson:
  724.  
  725.     An attempt to execute grid_slaves with arguments (0,0) results in
  726.     *all* of the slaves being returned, not just the slave associated with
  727.     row 0, column 0.  This is because the test for arguments in the method
  728.     does not test to see if row (and column) does not equal None, but
  729.     rather just whether is evaluates to non-false.  A value of 0 fails
  730.     this test.
  731.  
  732. Tue Mar 16 14:17:48 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  733.  
  734.     * Modules/cmathmodule.c:
  735.     Docstring fix:  acosh() returns the hyperbolic arccosine, not the
  736.     hyperbolic cosine.  Problem report via David Ascher by one of his
  737.     students.
  738.  
  739. Mon Mar 15 21:40:59 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  740.  
  741.     * configure.in:
  742.     Should test for gethost*by*name_r, not for gethostname_r (which
  743.     doesn't exist and doesn't make sense).
  744.  
  745.     * Modules/socketmodule.c:
  746.     Patch by Rob Riggs for Linux -- glibc2 has a different argument
  747.     converntion for gethostbyname_r() etc. than Solaris!
  748.  
  749.     * Python/thread_pthread.h: Rob Riggs wrote:
  750.  
  751.     """
  752.     Spec says that on success pthread_create returns 0. It does not say
  753.     that an error code will be < 0. Linux glibc2 pthread_create() returns
  754.     ENOMEM (12) when one exceed process limits. (It looks like it should
  755.     return EAGAIN, but that's another story.)
  756.  
  757.     For reference, see:
  758.     http://www.opengroup.org/onlinepubs/7908799/xsh/pthread_create.html
  759.     """
  760.  
  761.     [I have a feeling that similar bugs were fixed before; perhaps someone
  762.     could check that all error checks no check for != 0?]
  763.  
  764.     * Tools/bgen/bgen/bgenObjectDefinition.py:
  765.     New mixin class that defines cmp and hash that use
  766.     the ob_itself pointer.  This allows (when using the mixin)
  767.     different Python objects pointing to the same C object and
  768.     behaving well as dictionary keys.
  769.  
  770.     Or so sez Jack Jansen...
  771.  
  772.     * Lib/urllib.py: Yet another patch by Sjoerd Mullender:
  773.  
  774.     Don't convert URLs to URLs using pathname2url.
  775.  
  776. Fri Mar 12 22:15:43 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  777.  
  778.     * Lib/cmd.py: Patch by Michael Scharf.  He writes:
  779.  
  780.         The module cmd requires for each do_xxx command a help_xxx
  781.         function. I think this is a little old fashioned.
  782.  
  783.         Here is a patch: use the docstring as help if no help_xxx
  784.         function can be found.
  785.  
  786.     [I'm tempted to rip out all the help_* functions from pdb, but I'll
  787.     resist it.  Any takers?  --Guido]
  788.  
  789.     * Tools/freeze/freeze.py: Bug submitted by Wayne Knowles, who writes:
  790.  
  791.        Under Windows, python freeze.py -o hello hello.py
  792.        creates all the correct files in the hello subdirectory, but the
  793.        Makefile has the directory prefix in it for frozen_extensions.c
  794.        nmake fails because it tries to locate hello/frozen_extensions.c
  795.  
  796.     (His fix adds a call to os.path.basename() in the appropriate place.)
  797.  
  798.     * Objects/floatobject.c, Objects/intobject.c:
  799.     Vladimir has restructured his code somewhat so that the blocks are now
  800.     represented by an explicit structure.  (There are still too many casts
  801.     in the code, but that may be unavoidable.)
  802.  
  803.     Also added code so that with -vv it is very chatty about what it does.
  804.  
  805.     * Demo/zlib/zlibdemo.py, Demo/zlib/minigzip.py:
  806.     Change #! line to modern usage; also chmod +x
  807.  
  808.     * Demo/pdist/rrcs, Demo/pdist/rcvs, Demo/pdist/rcsbump:
  809.     Change #! line to modern usage
  810.  
  811.     * Lib/nturl2path.py, Lib/urllib.py: From: Sjoerd Mullender
  812.  
  813.     The filename to URL conversion didn't properly quote special
  814.     characters.
  815.     The URL to filename didn't properly unquote special chatacters.
  816.  
  817.     * Objects/floatobject.c:
  818.     OK, try again.  Vladimir gave me a fix for the alignment bus error,
  819.     so here's his patch again.  This time it works (at least on Solaris,
  820.     Linux and Irix).
  821.  
  822. Thu Mar 11 23:21:23 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  823.  
  824.     * Tools/idle/PathBrowser.py:
  825.     Don't crash when sys.path contains an empty string.
  826.  
  827.     * Tools/idle/PathBrowser.py:
  828.     - Don't crash in the case where a superclass is a string instead of a
  829.     pyclbr.Class object; this can happen when the superclass is
  830.     unrecognizable (to pyclbr), e.g. when module renaming is used.
  831.  
  832.     - Show a watch cursor when calling pyclbr (since it may take a while
  833.     recursively parsing imported modules!).
  834.  
  835. Thu Mar 11 16:04:04 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  836.  
  837.     * Lib/mimetypes.py:
  838.     Added .rdf and .xsl as application/xml types.  (.rdf is for the
  839.     Resource Description Framework, a metadata encoding, and .xsl is for
  840.     the Extensible Stylesheet Language.)
  841.  
  842. Thu Mar 11 13:26:23 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  843.  
  844.     * Lib/test/output/test_popen2, Lib/test/test_popen2.py:
  845.     Test for popen2 module, by Chris Tismer.
  846.  
  847.     * Objects/floatobject.c:
  848.     Alas, Vladimir's patch caused a bus error (probably double
  849.     alignment?), and I didn't test it.  Withdrawing it for now.
  850.  
  851. Wed Mar 10 22:55:47 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  852.  
  853.     * Objects/floatobject.c:
  854.     Patch by Vladimir Marangoz to allow freeing of the allocated blocks of
  855.     floats on finalization.
  856.  
  857.     * Objects/intobject.c:
  858.     Patch by Vladimir Marangoz to allow freeing of the allocated blocks of
  859.     integers on finalization.
  860.  
  861.     * Tools/idle/EditorWindow.py, Tools/idle/Bindings.py:
  862.     Add PathBrowser to File module
  863.  
  864.     * Tools/idle/PathBrowser.py:
  865.     "Path browser" - 4 scrolled lists displaying:
  866.         directories on sys.path
  867.         modules in selected directory
  868.         classes in selected module
  869.         methods of selected class
  870.  
  871.     Sinlge clicking in a directory, module or class item updates the next
  872.     column with info about the selected item.  Double clicking in a
  873.     module, class or method item opens the file (and selects the clicked
  874.     item if it is a class or method).
  875.  
  876.     I guess eventually I should be using a tree widget for this, but the
  877.     ones I've seen don't work well enough, so for now I use the old
  878.     Smalltalk or NeXT style multi-column hierarchical browser.
  879.  
  880.     * Tools/idle/MultiScrolledLists.py:
  881.     New utility: multiple scrolled lists in parallel
  882.  
  883.     * Tools/idle/ScrolledList.py: - White background.
  884.     - Display "(None)" (or text of your choosing) when empty.
  885.     - Don't set the focus.
  886.  
  887. Tue Mar  9 19:31:21 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  888.  
  889.     * Lib/urllib.py:
  890.     open_http also had the 'data is None' test backwards.  don't call with the
  891.     extra argument if data is None.
  892.  
  893.     * Demo/embed/demo.c:
  894.     Call Py_SetProgramName() instead of redefining getprogramname(),
  895.     reflecting changes in the runtime around 1.5 or earlier.
  896.  
  897.     * Python/ceval.c:
  898.     Always test for an error return (usually NULL or -1) without setting
  899.     an exception.
  900.  
  901.     * Modules/timemodule.c: Patch by Chris Herborth for BeOS code.
  902.     He writes:
  903.  
  904.     I had an off-by-1000 error in floatsleep(),
  905.     and the problem with time.clock() is that it's not implemented properly
  906.     on QNX... ANSI says it's supposed to return _CPU_ time used by the
  907.     process, but on QNX it returns the amount of real time used... so I was
  908.     confused.
  909.  
  910.     * Tools/bgen/bgen/macsupport.py: Small change by Jack Jansen.
  911.     Test for self.returntype behaving like OSErr rather than being it.
  912.  
  913. Thu Feb 25 16:14:58 1999  Jeremy Hylton  <jhylton@eric.cnri.reston.va.us>
  914.  
  915.     * Lib/urllib.py:
  916.     http_error had the 'data is None' test backwards.  don't call with the
  917.     extra argument if data is None.
  918.  
  919.     * Lib/urllib.py: change indentation from 8 spaces to 4 spaces
  920.  
  921.     * Lib/urllib.py: pleasing the tabnanny
  922.  
  923. Thu Feb 25 14:26:02 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  924.  
  925.     * Lib/colorsys.py:
  926.     Oops, one more "x, y, z" to convert...
  927.  
  928.     * Lib/colorsys.py:
  929.     Adjusted comment at the top to be less confusing, following Fredrik
  930.     Lundh's example.
  931.  
  932.     Converted comment to docstring.
  933.  
  934. Wed Feb 24 18:49:15 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  935.  
  936.     * Lib/toaiff.py:
  937.     Use sndhdr instead of the obsolete whatsound module.
  938.  
  939. Wed Feb 24 18:42:38 1999  Jeremy Hylton  <jhylton@eric.cnri.reston.va.us>
  940.  
  941.     * Lib/urllib.py:
  942.     When performing a POST request, i.e. when the second argument to
  943.     urlopen is used to specify form data, make sure the second argument is
  944.     threaded through all of the http_error_NNN calls.  This allows error
  945.     handlers like the redirect and authorization handlers to properly
  946.     re-start the connection.
  947.  
  948. Wed Feb 24 16:25:17 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  949.  
  950.     * Lib/mhlib.py: Patch by Lars Wirzenius:
  951.  
  952.         o the initial comment is wrong: creating messages is already
  953.           implemented
  954.  
  955.         o Message.getbodytext: if the mail or it's part contains an
  956.           empty content-transfer-encoding header, the code used to
  957.           break; the change below treats an empty encoding value the same
  958.           as the other types that do not need decoding
  959.  
  960.         o SubMessage.getbodytext was missing the decode argument; the
  961.           change below adds it; I also made it unconditionally return
  962.           the raw text if decoding was not desired, because my own
  963.           routines needed that (and it was easier than rewriting my
  964.           own routines ;-)
  965.  
  966. Wed Feb 24 00:35:43 1999  Barry Warsaw  <bwarsaw@eric.cnri.reston.va.us>
  967.  
  968.     * Python/bltinmodule.c (initerrors):
  969.     Make sure that the exception tuples ("base-classes" when
  970.     string-based exceptions are used) reflect the real class hierarchy,
  971.     i.e. that SystemExit derives from Exception not StandardError.
  972.  
  973.     * Lib/exceptions.py:
  974.     Document the correct class hierarchy for SystemExit.  It is not an
  975.     error and so it derives from Exception and not SystemError.  The
  976.     docstring was incorrect but the implementation was fine.
  977.  
  978. Tue Feb 23 23:07:51 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  979.  
  980.     * Lib/shutil.py:
  981.     Add import sys, needed by reference to sys.exc_info() in rmtree().
  982.     Discovered by Mitch Chapman.
  983.  
  984.     * config.h.in:
  985.     Now that we don't have AC_CHECK_LIB(m, pow), the HAVE_LIBM symbol
  986.     disappears.  It wasn't used anywhere anyway...
  987.  
  988.     * Modules/arraymodule.c:
  989.     Carefully check for overflow when allocating the memory for fromfile
  990.     -- someone tried to pass in sys.maxint and got bitten by the bogus
  991.     calculations.
  992.  
  993.     * configure.in:
  994.     Get rid of AC_CHECK_LIB(m, pow) since this is taken care of later with
  995.     LIBM (from --with-libm=...); this actually broke the customizability
  996.     offered by the latter option.  Thanks go to Clay Spence for reporting
  997.     this.
  998.  
  999.     * Lib/test/test_dl.py:
  1000.     1. Print the error message (carefully) when a dl.open() fails in verbose mode.
  1001.     2. When no test case worked, raise ImportError instead of failing.
  1002.  
  1003.     * Python/bltinmodule.c:
  1004.     Patch by Tim Peters to improve the range checks for range() and
  1005.     xrange(), especially for platforms where int and long are different
  1006.     sizes (so sys.maxint isn't actually the theoretical limit for the
  1007.     length of a list, but the largest C int is -- sys.maxint is the
  1008.     largest Python int, which is actually a C long).
  1009.  
  1010.     * Makefile.in:
  1011.     1. Augment the DG/UX rule so it doesn't break the BeOS build.
  1012.     2. Add $(EXE) to various occurrences of python so it will work on
  1013.        Cygwin with egcs (after setting EXE=.exe).  These patches by
  1014.        Norman Vine.
  1015.  
  1016.     * Lib/posixfile.py:
  1017.     According to Jeffrey Honig, bsd/os 2.0 - 4.0 should be added to the
  1018.     list (of bsd variants that have a different lock structure).
  1019.  
  1020.     * Lib/test/test_fcntl.py:
  1021.     According to Jeffrey Honig, bsd/os 4.0 should be added to the list.
  1022.  
  1023.     * Modules/timemodule.c:
  1024.     Patch by Tadayoshi Funaba (with some changes) to be smarter about
  1025.     guessing what happened when strftime() returns 0.  Is it buffer
  1026.     overflow or was the result simply 0 bytes long?  (This happens for an
  1027.     empty format string, or when the format string is a single %Z and the
  1028.     timezone is unknown.)  if the buffer is at least 256 times as long as
  1029.     the format, assume the latter.
  1030.  
  1031. Mon Feb 22 19:01:42 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  1032.  
  1033.     * Lib/urllib.py:
  1034.     As Des Barry points out, we need to call pathname2url(file) in two
  1035.     calls to addinfourl() in open_file().
  1036.  
  1037.     * Modules/Setup.in: Document *static* -- in two places!
  1038.  
  1039.     * Modules/timemodule.c:
  1040.     We don't support leap seconds, so the seconds field of a time 9-tuple
  1041.     should be in the range [0-59].  Noted by Tadayoshi Funaba.
  1042.  
  1043.     * Modules/stropmodule.c:
  1044.     In atoi(), don't use isxdigit() to test whether the last character
  1045.     converted was a "digit" -- use isalnum().  This test is there only to
  1046.     guard against "+" or "-" being interpreted as a valid int literal.
  1047.     Reported by Takahiro Nakayama.
  1048.  
  1049.     * Lib/os.py:
  1050.     As Finn Bock points out, _P_WAIT etc. don't have a leading underscore
  1051.     so they don't need to be treated specially here.
  1052.  
  1053. Mon Feb 22 15:38:58 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  1054.  
  1055.     * Misc/NEWS:
  1056.     Typo:  "apparentlt" --> "apparently"
  1057.  
  1058. Mon Feb 22 15:38:46 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  1059.  
  1060.     * Lib/urlparse.py: Steve Clift pointed out that 'file' allows a netloc.
  1061.  
  1062.     * Modules/posixmodule.c:
  1063.     The docstring for ttyname(..) claims a second "mode" argument. The
  1064.     actual code does not allow such an argument.  (Finn Bock.)
  1065.  
  1066.     * Lib/lib-old/poly.py:
  1067.     Dang.  Even though this is obsolete code, somebody found a bug, and I
  1068.     fix it.  Oh well.
  1069.  
  1070. Thu Feb 18 20:51:50 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  1071.  
  1072.     * Lib/pyclbr.py:
  1073.     Bow to font-lock at the end of the docstring, since it throws stuff
  1074.     off.
  1075.  
  1076.     Make sure the path paramter to readmodule() is a list before adding it
  1077.     with sys.path, or the addition could fail.
  1078.  
  1079.  
  1080. ======================================================================
  1081.  
  1082.  
  1083. From 1.5.2b1 to 1.5.2b2
  1084. =======================
  1085.  
  1086. General
  1087. -------
  1088.  
  1089. - Many memory leaks fixed.
  1090.  
  1091. - Many small bugs fixed.
  1092.  
  1093. - Command line option -OO (or -O -O) suppresses inclusion of doc
  1094. strings in resulting bytecode.
  1095.  
  1096. Windows-specific changes
  1097. ------------------------
  1098.  
  1099. - New built-in module winsound provides an interface to the Win32
  1100. PlaySound() call.
  1101.  
  1102. - Re-enable the audioop module in the config.c file.
  1103.  
  1104. - On Windows, support spawnv() and associated P_* symbols.
  1105.  
  1106. - Fixed the conversion of times() return values on Windows.
  1107.  
  1108. - Removed freeze from the installer -- it doesn't work without the
  1109. source tree.  (See FAQ 8.11.)
  1110.  
  1111. - On Windows 95/98, the Tkinter module now is smart enough to find
  1112. Tcl/Tk even when the PATH environment variable hasn't been set -- when
  1113. the import of _tkinter fails, it searches in a standard locations,
  1114. patches os.environ["PATH"], and tries again.  When it still fails, a
  1115. clearer error message is produced.  This should avoid most
  1116. installation problems with Tkinter use (e.g. in IDLE).
  1117.  
  1118. - The -i option doesn't make any calls to set[v]buf() for stdin --
  1119. this apparently screwed up _kbhit() and the _tkinter main loop.
  1120.  
  1121. - The ntpath module (and hence, os.path on Windows) now parses out UNC
  1122. paths (e.g. \\host\mountpoint\dir\file) as "drive letters", so that
  1123. splitdrive() will \\host\mountpoint as the drive and \dir\file as the
  1124. path.  ** EXPERIMENTAL **
  1125.  
  1126. - Added a hack to the exit code so that if (1) the exit status is
  1127. nonzero and (2) we think we have our own DOS box (i.e. we're not
  1128. started from a command line shell), we print a message and wait for
  1129. the user to hit a key before the DOS box is closed.
  1130.  
  1131. - Updated the installer to WISE 5.0g.  Added a dialog warning about
  1132. the imminent Tcl installation.  Added a dialog to specify the program
  1133. group name in the start menu.  Upgraded the Tcl installer to Tcl
  1134. 8.0.4.
  1135.  
  1136. Changes to intrinsics
  1137. ---------------------
  1138.  
  1139. - The repr() or str() of a module object now shows the __file__
  1140. attribute (i.e., the file which it was loaded), or the string
  1141. "(built-in)" if there is no __file__ attribute.
  1142.  
  1143. - The range() function now avoids overflow during its calculations (if
  1144. at all possible).
  1145.  
  1146. - New info string sys.hexversion, which is an integer encoding the
  1147. version in hexadecimal.  In other words, hex(sys.hexversion) ==
  1148. 0x010502b2 for Python 1.5.2b2.
  1149.  
  1150. New or improved ports
  1151. ---------------------
  1152.  
  1153. - Support for Nextstep descendants (future Mac systems).
  1154.  
  1155. - Improved BeOS support.
  1156.  
  1157. - Support dynamic loading of shared libraries on NetBSD platforms that 
  1158. use ELF (i.e., MIPS and Alpha systems).
  1159.  
  1160. Configuration/build changes
  1161. ---------------------------
  1162.  
  1163. - The Lib/test directory is no longer included in the default module
  1164. search path (sys.path) -- "test" has been a package ever since 1.5.
  1165.  
  1166. - Now using autoconf 2.13.
  1167.  
  1168. New library modules
  1169. -------------------
  1170.  
  1171. - New library modules asyncore and asynchat: these form Sam Rushing's
  1172. famous asynchronous socket library.  Sam has gracefully allowed me to
  1173. incorporate these in the standard Python library.
  1174.  
  1175. - New module statvfs contains indexing constants for [f]statvfs()
  1176. return tuple.
  1177.  
  1178. Changes to the library
  1179. ----------------------
  1180.  
  1181. - The wave module (platform-independent support for Windows sound
  1182. files) has been fixed to actually make it work.
  1183.  
  1184. - The sunau module (platform-independent support for Sun/NeXT sound
  1185. files) has been fixed to work across platforms.  Also, a weird
  1186. encoding bug in the header of the audio test data file has been
  1187. corrected.
  1188.  
  1189. - Fix a bug in the urllib module that occasionally tripped up
  1190. webchecker and other ftp retrieves.
  1191.  
  1192. - ConfigParser's get() method now accepts an optional keyword argument
  1193. (vars) that is substituted on top of the defaults that were setup in
  1194. __init__.  You can now also have recusive references in your
  1195. configuration file.
  1196.  
  1197. - Some improvements to the Queue module, including a put_nowait()
  1198. module and an optional "block" second argument, to get() and put(),
  1199. defaulting to 1.
  1200.  
  1201. - The updated xmllib module is once again compatible with the version
  1202. present in Python 1.5.1 (this was accidentally broken in 1.5.2b1).
  1203.  
  1204. - The bdb module (base class for the debugger) now supports
  1205. canonicalizing pathnames used in breakpoints.  The derived class must
  1206. override the new canonical() method for this to work.  Also changed
  1207. clear_break() to the backwards compatible old signature, and added
  1208. clear_bpbynumber() for the new functionality.
  1209.  
  1210. - In sgmllib (and hence htmllib), recognize attributes even if they
  1211. don't have space in front of them.  I.e.  '<a
  1212. name="foo"href="bar.html">' will now have two attributes recognized.
  1213.  
  1214. - In the debugger (pdb), change clear syntax to support three
  1215. alternatives: clear; clear file:line; clear bpno bpno ...
  1216.  
  1217. - The os.path module now pretends to be a submodule within the os
  1218. "package", so you can do things like "from os.path import exists".
  1219.  
  1220. - The standard exceptions now have doc strings.
  1221.  
  1222. - In the smtplib module, exceptions are now classes.  Also avoid
  1223. inserting a non-standard space after "TO" in rcpt() command.
  1224.  
  1225. - The rfc822 module's getaddrlist() method now uses all occurrences of
  1226. the specified header instead of just the first.  Some other bugfixes
  1227. too (to handle more weird addresses found in a very large test set,
  1228. and to avoid crashes on certain invalid dates), and a small test
  1229. module has been added.
  1230.  
  1231. - Fixed bug in urlparse in the common-case code for HTTP URLs; it
  1232. would lose the query, fragment, and/or parameter information.
  1233.  
  1234. - The sndhdr module no longer supports whatraw() -- it depended on a
  1235. rare extenral program.
  1236.  
  1237. - The UserList module/class now supports the extend() method, like
  1238. real list objects.
  1239.  
  1240. - The uu module now deals better with trailing garbage generated by
  1241. some broke uuencoders.
  1242.  
  1243. - The telnet module now has an my_interact() method which uses threads
  1244. instead of select.  The interact() method uses this by default on
  1245. Windows (where the single-threaded version doesn't work).
  1246.  
  1247. - Add a class to mailbox.py for dealing with qmail directory
  1248. mailboxes.  The test code was extended to notice these being used as
  1249. well.
  1250.  
  1251. Changes to extension modules
  1252. ----------------------------
  1253.  
  1254. - Support for the [f]statvfs() system call, where it exists.
  1255.  
  1256. - Fixed some bugs in cPickle where bad input could cause it to dump
  1257. core.
  1258.  
  1259. - Fixed cStringIO to make the writelines() function actually work.
  1260.  
  1261. - Added strop.expandtabs() so string.expandtabs() is now much faster.
  1262.  
  1263. - Added fsync() and fdatasync(), if they appear to exist.
  1264.  
  1265. - Support for "long files" (64-bit seek pointers).
  1266.  
  1267. - Fixed a bug in the zlib module's flush() function.
  1268.  
  1269. - Added access() system call.  It returns 1 if access granted, 0 if
  1270. not.
  1271.  
  1272. - The curses module implements an optional nlines argument to
  1273. w.scroll().  (It then calls wscrl(win, nlines) instead of scoll(win).)
  1274.  
  1275. Changes to tools
  1276. ----------------
  1277.  
  1278. - Some changes to IDLE; see Tools/idle/NEWS.txt.
  1279.  
  1280. - Latest version of Misc/python-mode.el included.
  1281.  
  1282. Changes to Tkinter
  1283. ------------------
  1284.  
  1285. - Avoid tracebacks when an image is deleted after its root has been
  1286. destroyed.
  1287.  
  1288. Changes to the Python/C API
  1289. ---------------------------
  1290.  
  1291. - When parentheses are used in a PyArg_Parse[Tuple]() call, any
  1292. sequence is now accepted, instead of requiring a tuple.  This is in
  1293. line with the general trend towards accepting arbitrary sequences.
  1294.  
  1295. - Added PyModule_GetFilename().
  1296.  
  1297. - In PyNumber_Power(), remove unneeded and even harmful test for float
  1298. to the negative power (which is already and better done in
  1299. floatobject.c).
  1300.  
  1301. - New version identification symbols; read patchlevel.h for info.  The
  1302. version numbers are now exported by Python.h.
  1303.  
  1304. - Rolled back the API version change -- it's back to 1007!
  1305.  
  1306. - The frozenmain.c function calls PyInitFrozenExtensions().
  1307.  
  1308. - Added 'N' format character to Py_BuildValue -- like 'O' but doesn't
  1309. INCREF.
  1310.  
  1311.  
  1312. ======================================================================
  1313.  
  1314.  
  1315. From 1.5.2a2 to 1.5.2b1
  1316. =======================
  1317.  
  1318. Changes to intrinsics
  1319. ---------------------
  1320.  
  1321. - New extension NotImplementedError, derived from RuntimeError.  Not
  1322. used, but recommended use is for "abstract" methods to raise this.
  1323.  
  1324. - The parser will now spit out a warning or error when -t or -tt is
  1325. used for parser input coming from a string, too.
  1326.  
  1327. - The code generator now inserts extra SET_LINENO opcodes when
  1328. compiling multi-line argument lists.
  1329.  
  1330. - When comparing bound methods, use identity test on the objects, not
  1331. equality test.
  1332.  
  1333. New or improved ports
  1334. ---------------------
  1335.  
  1336. - Chris Herborth has redone his BeOS port; it now works on PowerPC
  1337. (R3/R4) and x86 (R4 only).  Threads work too in this port.
  1338.  
  1339. Renaming
  1340. --------
  1341.  
  1342. - Thanks to Chris Herborth, the thread primitives now have proper Py*
  1343. names in the source code (they already had those for the linker,
  1344. through some smart macros; but the source still had the old, un-Py
  1345. names).
  1346.  
  1347. Configuration/build changes
  1348. ---------------------------
  1349.  
  1350. - Improved support for FreeBSD/3.
  1351.  
  1352. - Check for pthread_detach instead of pthread_create in libc.
  1353.  
  1354. - The makesetup script now searches EXECINCLUDEPY before INCLUDEPY.
  1355.  
  1356. - Misc/Makefile.pre.in now also looks at Setup.thread and Setup.local.
  1357. Otherwise modules such as thread didn't get incorporated in extensions.
  1358.  
  1359. New library modules
  1360. -------------------
  1361.  
  1362. - shlex.py by Eric Raymond provides a lexical analyzer class for
  1363. simple shell-like syntaxes.
  1364.  
  1365. - netrc.py by Eric Raymond provides a parser for .netrc files.  (The
  1366. undocumented Netrc class in ftplib.py is now obsolete.)
  1367.  
  1368. - codeop.py is a new module that contains the compile_command()
  1369. function that was previously in code.py.  This is so that JPython can
  1370. provide its own version of this function, while still sharing the
  1371. higher-level classes in code.py.
  1372.  
  1373. - turtle.py is a new module for simple turtle graphics.  I'm still
  1374. working on it; let me know if you use this to teach Python to children 
  1375. or other novices without prior programming experience.
  1376.  
  1377. Obsoleted library modules
  1378. -------------------------
  1379.  
  1380. - poly.py and zmod.py have been moved to Lib/lib-old to emphasize
  1381. their status of obsoleteness.  They don't do a particularly good job
  1382. and don't seem particularly relevant to the Python core.
  1383.  
  1384. New tools
  1385. ---------
  1386.  
  1387. - I've added IDLE: my Integrated DeveLopment Environment for Python.
  1388. Requires Tcl/Tk (and Tkinter).  Works on Windows and Unix (and should
  1389. work on Macintosh, but I haven't been able to test it there; it does
  1390. depend on new features in 1.5.2 and perhaps even new features in
  1391. 1.5.2b1, especially the new code module).  This is very much a work in
  1392. progress.  I'd like to hear how people like it compared to PTUI (or
  1393. any other IDE they are familiar with).
  1394.  
  1395. - New tools by Barry Warsaw:
  1396.  
  1397.   = audiopy: controls the Solaris Audio device
  1398.   = pynche:  The PYthonically Natural Color and Hue Editor
  1399.   = world:   Print mappings between country names and DNS country codes
  1400.  
  1401. New demos
  1402. ---------
  1403.  
  1404. - Demo/scripts/beer.py prints the lyrics to an arithmetic drinking
  1405. song.
  1406.  
  1407. - Demo/tkinter/guido/optionmenu.py shows how to do an option menu in
  1408. Tkinter.  (By Fredrik Lundh -- not by me!)
  1409.  
  1410. Changes to the library
  1411. ----------------------
  1412.  
  1413. - compileall.py now avoids recompiling .py files that haven't changed;
  1414. it adds a -f option to force recompilation.
  1415.  
  1416. - New version of xmllib.py by Sjoerd Mullender (0.2 with latest
  1417. patches).
  1418.  
  1419. - nntplib.py: statparse() no longer lowercases the message-id.
  1420.  
  1421. - types.py: use type(__stdin__) for FileType.
  1422.  
  1423. - urllib.py: fix translations for filenames with "funny" characters.
  1424. Patch by Sjoerd Mullender.  Note that if you subclass one of the
  1425. URLopener classes, and you have copied code from the old urllib.py,
  1426. your subclass may stop working.  A long-term solution is to provide
  1427. more methods so that you don't have to copy code.
  1428.  
  1429. - cgi.py: In read_multi, allow a subclass to override the class we
  1430. instantiate when we create a recursive instance, by setting the class
  1431. variable 'FieldStorageClass' to the desired class.  By default, this
  1432. is set to None, in which case we use self.__class__ (as before).
  1433. Also, a patch by Jim Fulton to pass additional arguments to recursive
  1434. calls to the FieldStorage constructor from its read_multi method.
  1435.  
  1436. - UserList.py: In __getslice__, use self.__class__ instead of
  1437. UserList.
  1438.  
  1439. - In SimpleHTTPServer.py, the server specified in test() should be
  1440. BaseHTTPServer.HTTPServer, in case the request handler should want to
  1441. reference the two attributes added by BaseHTTPServer.server_bind.  (By
  1442. Jeff Rush, for Bobo).  Also open the file in binary mode, so serving
  1443. images from a Windows box might actually work.
  1444.  
  1445. - In CGIHTTPServer.py, the list of acceptable formats is -split-
  1446. on spaces but -joined- on commas, resulting in double commas
  1447. in the joined text.  (By Jeff Rush.)
  1448.  
  1449. - SocketServer.py, patch by Jeff Bauer: a minor change to declare two
  1450. new threaded versions of Unix Server classes, using the ThreadingMixIn
  1451. class: ThreadingUnixStreamServer, ThreadingUnixDatagramServer.
  1452.  
  1453. - bdb.py: fix bomb on deleting a temporary breakpoint: there's no
  1454. method do_delete(); do_clear() was meant.  By Greg Ward.
  1455.  
  1456. - getopt.py: accept a non-list sequence for the long options (request
  1457. by Jack Jansen).  Because it might be a common mistake to pass a
  1458. single string, this situation is treated separately.  Also added
  1459. docstrings (copied from the library manual) and removed the (now
  1460. redundant) module comments.
  1461.  
  1462. - tempfile.py: improvements to avoid security leaks.
  1463.  
  1464. - code.py: moved compile_command() to new module codeop.py.
  1465.  
  1466. - pickle.py: support pickle format 1.3 (binary float added).  By Jim
  1467. Fulton. Also get rid of the undocumented obsolete Pickler dump_special
  1468. method.
  1469.  
  1470. - uu.py: Move 'import sys' to top of module, as noted by Tim Peters.
  1471.  
  1472. - imaplib.py: fix problem with some versions of IMAP4 servers that
  1473. choose to mix the case in their CAPABILITIES response.
  1474.  
  1475. - cmp.py: use (f1, f2) as cache key instead of f1 + ' ' + f2.  Noted
  1476. by Fredrik Lundh.
  1477.  
  1478. Changes to extension modules
  1479. ----------------------------
  1480.  
  1481. - More doc strings for several modules were contributed by Chris
  1482. Petrilli: math, cmath, fcntl.
  1483.  
  1484. - Fixed a bug in zlibmodule.c that could cause core dumps on
  1485. decompression of rarely occurring input.
  1486.  
  1487. - cPickle.c: new version from Jim Fulton, with Open Source copyright
  1488. notice.  Also, initialize self->safe_constructors early on to prevent
  1489. crash in early dealloc.
  1490.  
  1491. - cStringIO.c: new version from Jim Fulton, with Open Source copyright
  1492. notice.  Also fixed a core dump in cStringIO.c when doing seeks.
  1493.  
  1494. - mpzmodule.c: fix signed character usage in mpz.mpz(stringobjecty).
  1495.  
  1496. - readline.c: Bernard Herzog pointed out that rl_parse_and_bind
  1497. modifies its argument string (bad function!), so we make a temporary
  1498. copy.
  1499.  
  1500. - sunaudiodev.c: Barry Warsaw added more smarts to get the device and
  1501. control pseudo-device, per audio(7I).
  1502.  
  1503. Changes to tools
  1504. ----------------
  1505.  
  1506. - New, improved version of Barry Warsaw's Misc/python-mode.el (editing 
  1507. support for Emacs).
  1508.  
  1509. - tabnanny.py: added a -q ('quiet') option to tabnanny, which causes
  1510. only the names of offending files to be printed.
  1511.  
  1512. - freeze: when printing missing modules, also print the module they
  1513. were imported from.
  1514.  
  1515. - untabify.py: patch by Detlef Lannert to implement -t option
  1516. (set tab size).
  1517.  
  1518. Changes to Tkinter
  1519. ------------------
  1520.  
  1521. - grid_bbox(): support new Tk API: grid bbox ?column row? ?column2
  1522. row2?
  1523.  
  1524. - _tkinter.c: RajGopal Srinivasan noted that the latest code (1.5.2a2)
  1525. doesn't work when running in a non-threaded environment.  He added
  1526. some #ifdefs that fix this.
  1527.  
  1528. Changes to the Python/C API
  1529. ---------------------------
  1530.  
  1531. - Bumped API version number to 1008 -- enough things have changed!
  1532.  
  1533. - There's a new macro, PyThreadState_GET(), which does the same work
  1534. as PyThreadState_Get() without the overhead of a function call (it
  1535. also avoids the error check).  The two top calling locations of
  1536. PyThreadState_Get() have been changed to use this macro.
  1537.  
  1538. - All symbols intended for export from a DLL or shared library are now
  1539. marked as such (with the DL_IMPORT() macro) in the header file that
  1540. declares them.  This was needed for the BeOS port, and should also
  1541. make some other ports easier.  The PC port no longer needs the file
  1542. with exported symbols (PC/python_nt.def).  There's also a DL_EXPORT
  1543. macro which is only used for init methods in extension modules, and
  1544. for Py_Main().
  1545.  
  1546. Invisible changes to internals
  1547. ------------------------------
  1548.  
  1549. - Fixed a bug in new_buffersize() in fileobject.c which could
  1550. return a buffer size that was way too large.
  1551.  
  1552. - Use PySys_WriteStderr instead of fprintf in most places.
  1553.  
  1554. - dictobject.c: remove dead code discovered by Vladimir Marangozov.
  1555.  
  1556. - tupleobject.c: make tuples less hungry -- an extra item was
  1557. allocated but never used.  Tip by Vladimir Marangozov.
  1558.  
  1559. - mymath.h: Metrowerks PRO4 finally fixes the hypot snafu.  (Jack
  1560. Jansen)
  1561.  
  1562. - import.c: Jim Fulton fixes a reference count bug in
  1563. PyEval_GetGlobals.
  1564.  
  1565. - glmodule.c: check in the changed version after running the stubber
  1566. again -- this solves the conflict with curses over the 'clear' entry
  1567. point much nicer.  (Jack Jansen had checked in the changes to cstubs
  1568. eons ago, but I never regenrated glmodule.c :-( )
  1569.  
  1570. - frameobject.c: fix reference count bug in PyFrame_New.  Vladimir
  1571. Marangozov.
  1572.  
  1573. - stropmodule.c: add a missing DECREF in an error exit.  Submitted by
  1574. Jonathan Giddy.
  1575.  
  1576.  
  1577. ======================================================================
  1578.  
  1579.  
  1580. From 1.5.2a1 to 1.5.2a2
  1581. =======================
  1582.  
  1583. General
  1584. -------
  1585.  
  1586. - It is now a syntax error to have a function argument without a
  1587. default following one with a default.
  1588.  
  1589. - __file__ is now set to the .py file if it was parsed (it used to
  1590. always be the .pyc/.pyo file).
  1591.  
  1592. - Don't exit with a fatal error during initialization when there's a
  1593. problem with the exceptions.py module.
  1594.  
  1595. - New environment variable PYTHONOPTIMIZE can be used to set -O.
  1596.  
  1597. - New version of python-mode.el for Emacs.
  1598.  
  1599. Miscellaneous fixed bugs
  1600. ------------------------
  1601.  
  1602. - No longer print the (confusing) error message about stack underflow
  1603. while compiling.
  1604.  
  1605. - Some threading and locking bugs fixed.
  1606.  
  1607. - When errno is zero, report "Error", not "Success".
  1608.  
  1609. Documentation
  1610. -------------
  1611.  
  1612. - Documentation will be released separately.
  1613.  
  1614. - Doc strings added to array and md5 modules by Chris Petrilli.
  1615.  
  1616. Ports and build procedure
  1617. -------------------------
  1618.  
  1619. - Stop installing when a move or copy fails.
  1620.  
  1621. - New version of the OS/2 port code by Jeff Rush.
  1622.  
  1623. - The makesetup script handles absolute filenames better.
  1624.  
  1625. - The 'new' module is now enabled by default in the Setup file.
  1626.  
  1627. - I *think* I've solved the problem with the Linux build blowing up
  1628. sometimes due to a conflict between sigcheck/intrcheck and
  1629. signalmodule.
  1630.  
  1631. Built-in functions
  1632. ------------------
  1633.  
  1634. - The second argument to apply() can now be any sequence, not just a
  1635. tuple.
  1636.  
  1637. Built-in types
  1638. --------------
  1639.  
  1640. - Lists have a new method: L1.extend(L2) is equivalent to the common
  1641. idiom L1[len(L1):] = L2.
  1642.  
  1643. - Better error messages when a sequence is indexed with a non-integer.
  1644.  
  1645. - Bettter error message when calling a non-callable object (include
  1646. the type in the message).
  1647.  
  1648. Python services
  1649. ---------------
  1650.  
  1651. - New version of cPickle.c fixes some bugs.
  1652.  
  1653. - pickle.py: improved instantiation error handling.
  1654.  
  1655. - code.py: reworked quite a bit.  New base class
  1656. InteractiveInterpreter and derived class InteractiveConsole.  Fixed
  1657. several problems in compile_command().
  1658.  
  1659. - py_compile.py: print error message and continue on syntax errors.
  1660. Also fixed an old bug with the fstat code (it was never used).
  1661.  
  1662. - pyclbr.py: support submodules of packages.
  1663.  
  1664. String Services
  1665. ---------------
  1666.  
  1667. - StringIO.py: raise the right exception (ValueError) for attempted
  1668. I/O on closed StringIO objects.
  1669.  
  1670. - re.py: fixed a bug in subn(), which caused .groups() to fail inside
  1671. the replacement function called by sub().
  1672.  
  1673. - The struct module has a new format 'P': void * in native mode.
  1674.  
  1675. Generic OS Services
  1676. -------------------
  1677.  
  1678. - Module time: Y2K robustness.  2-digit year acceptance depends on
  1679. value of time.accept2dyear, initialized from env var PYTHONY2K,
  1680. default 0.  Years 00-68 mean 2000-2068, while 69-99 mean 1969-1999
  1681. (POSIX or X/Open recommendation).
  1682.  
  1683. - os.path: normpath(".//x") should return "x", not "/x".
  1684.  
  1685. - getpass.py: fall back on default_getpass() when sys.stdin.fileno()
  1686. doesn't work.
  1687.  
  1688. - tempfile.py: regenerate the template after a fork() call.
  1689.  
  1690. Optional OS Services
  1691. --------------------
  1692.  
  1693. - In the signal module, disable restarting interrupted system calls
  1694. when we have siginterrupt().
  1695.  
  1696. Debugger
  1697. --------
  1698.  
  1699. - No longer set __args__; this feature is no longer supported and can
  1700. affect the debugged code.
  1701.  
  1702. - cmd.py, pdb.py and bdb.py have been overhauled by Richard Wolff, who
  1703. added aliases and some other useful new features, e.g. much better
  1704. breakpoint support: temporary breakpoint, disabled breakpoints,
  1705. breakpoints with ignore counts, and conditions; breakpoints can be set
  1706. on a file before it is loaded.
  1707.  
  1708. Profiler
  1709. --------
  1710.  
  1711. - Changes so that JPython can use it.  Also fix the calibration code
  1712. so it actually works again
  1713. .
  1714. Internet Protocols and Support
  1715. ------------------------------
  1716.  
  1717. - imaplib.py: new version from Piers Lauder.
  1718.  
  1719. - smtplib.py: change sendmail() method to accept a single string or a
  1720. list or strings as the destination (commom newbie mistake).
  1721.  
  1722. - poplib.py: LIST with a msg argument fixed.
  1723.  
  1724. - urlparse.py: some optimizations for common case (http).
  1725.  
  1726. - urllib.py: support content-length in info() for ftp protocol;
  1727. support for a progress meter through a third argument to
  1728. urlretrieve(); commented out gopher test (the test site is dead).
  1729.  
  1730. Internet Data handling
  1731. ----------------------
  1732.  
  1733. - sgmllib.py: support tags with - or . in their name.
  1734.  
  1735. - mimetypes.py: guess_type() understands 'data' URLs.
  1736.  
  1737. Restricted Execution
  1738. --------------------
  1739.  
  1740. - The classes rexec.RModuleLoader and rexec.RModuleImporter no
  1741. longer exist.
  1742.  
  1743. Tkinter
  1744. -------
  1745.  
  1746. - When reporting an exception, store its info in sys.last_*.  Also,
  1747. write all of it to stderr.
  1748.  
  1749. - Added NS, EW, and NSEW constants, for grid's sticky option.
  1750.  
  1751. - Fixed last-minute bug in 1.5.2a1 release: need to include "mytime.h".
  1752.  
  1753. - Make bind variants without a sequence return a tuple of sequences
  1754. (formerly it returned a string, which wasn't very convenient).
  1755.  
  1756. - Add image commands to the Text widget (these are new in Tk 8.0).
  1757.  
  1758. - Added new listbox and canvas methods: {xview,yview}_{scroll,moveto}.)
  1759.  
  1760. - Improved the thread code (but you still can't call update() from
  1761. another thread on Windows).
  1762.  
  1763. - Fixed unnecessary references to _default_root in the new dialog
  1764. modules.
  1765.  
  1766. - Miscellaneous problems fixed.
  1767.  
  1768.  
  1769. Windows General
  1770. ---------------
  1771.  
  1772. - Call LoadLibraryEx(..., ..., LOAD_WITH_ALTERED_SEARCH_PATH) to
  1773. search for dependent dlls in the directory containing the .pyd.
  1774.  
  1775. - In debugging mode, call DebugBreak() in Py_FatalError().
  1776.  
  1777. Windows Installer
  1778. -----------------
  1779.  
  1780. - Install zlib.dll in the DLLs directory instead of in the win32
  1781. system directory, to avoid conflicts with other applications that have 
  1782. their own zlib.dll.
  1783.  
  1784. Test Suite
  1785. ----------
  1786.  
  1787. - test_long.py: new test for long integers, by Tim Peters.
  1788.  
  1789. - regrtest.py: improved so it can be used for other test suites as
  1790. well.
  1791.  
  1792. - test_strftime.py: use re to compare test results, to support legal
  1793. variants (e.g. on Linux).
  1794.  
  1795. Tools and Demos
  1796. ---------------
  1797.  
  1798. - Four new scripts in Tools/scripts: crlf.py and lfcr.py (to
  1799. remove/add Windows style '\r\n' line endings), untabify.py (to remove
  1800. tabs), and rgrep.yp (reverse grep).
  1801.  
  1802. - Improvements to Tools/freeze/.  Each Python module is now written to
  1803. its own C file.  This prevents some compilers or assemblers from
  1804. blowing up on large frozen programs, and saves recompilation time if
  1805. only a few modules are changed.  Other changes too, e.g. new command
  1806. line options -x and -i.
  1807.  
  1808. - Much improved (and smaller!) version of Tools/scripts/mailerdaemon.py.
  1809.  
  1810. Python/C API
  1811. ------------
  1812.  
  1813. - New mechanism to support extensions of the type object while
  1814. remaining backward compatible with extensions compiled for previous
  1815. versions of Python 1.5.  A flags field indicates presence of certain
  1816. fields.
  1817.  
  1818. - Addition to the buffer API to differentiate access to bytes and
  1819. 8-bit characters (in anticipation of Unicode characters).
  1820.  
  1821. - New argument parsing format t# ("text") to indicate 8-bit
  1822. characters; s# simply means 8-bit bytes, for backwards compatibility.
  1823.  
  1824. - New object type, bufferobject.c is an example and can be used to
  1825. create buffers from memory.
  1826.  
  1827. - Some support for 64-bit longs, including some MS platforms.
  1828.  
  1829. - Many calls to fprintf(stderr, ...) have been replaced with calls to
  1830. PySys_WriteStderr(...).
  1831.  
  1832. - The calling context for PyOS_Readline() has changed: it must now be
  1833. called with the interpreter lock held!  It releases the lock around
  1834. the call to the function pointed to by PyOS_ReadlineFunctionPointer
  1835. (default PyOS_StdioReadline()).
  1836.  
  1837. - New APIs PyLong_FromVoidPtr() and PyLong_AsVoidPtr().
  1838.  
  1839. - Renamed header file "thread.h" to "pythread.h".
  1840.  
  1841. - The code string of code objects may now be anything that supports the
  1842. buffer API.
  1843.  
  1844.  
  1845. ======================================================================
  1846.  
  1847.  
  1848. From 1.5.1 to 1.5.2a1
  1849. =====================
  1850.  
  1851. General
  1852. -------
  1853.  
  1854. - When searching for the library, a landmark that is a compiled module
  1855. (string.pyc or string.pyo) is also accepted.
  1856.  
  1857. - When following symbolic links to the python executable, use a loop
  1858. so that a symlink to a symlink can work.
  1859.  
  1860. - Added a hack so that when you type 'quit' or 'exit' at the
  1861. interpreter, you get a friendly explanation of how to press Ctrl-D (or 
  1862. Ctrl-Z) to exit.
  1863.  
  1864. - New and improved Misc/python-mode.el (Python mode for Emacs).
  1865.  
  1866. - Revert a new feature in Unix dynamic loading: for one or two
  1867. revisions, modules were loaded using the RTLD_GLOBAL flag.  It turned
  1868. out to be a bad idea.
  1869.  
  1870. Miscellaneous fixed bugs
  1871. ------------------------
  1872.  
  1873. - All patches on the patch page have been integrated.  (But much more
  1874. has been done!)
  1875.  
  1876. - Several memory leaks plugged (e.g. the one for classes with a
  1877. __getattr__ method).
  1878.  
  1879. - Removed the only use of calloc().  This triggered an obscure bug on
  1880. multiprocessor Sparc Solaris 2.6.
  1881.  
  1882. - Fix a peculiar bug that would allow "import sys.time" to succeed
  1883. (believing the built-in time module to be a part of the sys package).
  1884.  
  1885. - Fix a bug in the overflow checking when converting a Python long to
  1886. a C long (failed to convert -2147483648L, and some other cases).
  1887.  
  1888. Documentation
  1889. -------------
  1890.  
  1891. - Doc strings have been added to many extension modules: __builtin__,
  1892. errno, select, signal, socket, sys, thread, time.  Also to methods of
  1893. list objects (try [].append.__doc__).  A doc string on a type will now
  1894. automatically be propagated to an instance if the instance has methods
  1895. that are accessed in the usual way.
  1896.  
  1897. - The documentation has been expanded and the formatting improved.
  1898. (Remember that the documentation is now unbundled and has its own
  1899. release cycle though; see http://www.python.org/doc/.)
  1900.  
  1901. - Added Misc/Porting -- a mini-FAQ on porting to a new platform.
  1902.  
  1903. Ports and build procedure
  1904. -------------------------
  1905.  
  1906. - The BeOS port is now integrated.  Courtesy Chris Herborth.
  1907.  
  1908. - Symbol files for FreeBSD 2.x and 3.x have been contributed
  1909. (Lib/plat-freebsd[23]/*).
  1910.  
  1911. - Support HPUX 10.20 DCE threads.
  1912.  
  1913. - Finally fixed the configure script so that (on SGI) if -OPT:Olimit=0
  1914. works, it won't also use -Olimit 1500 (which gives a warning for every
  1915. file).  Also support the SGI_ABI environment variable better.
  1916.  
  1917. - The makesetup script now understands absolute pathnames ending in .o
  1918. in the module -- it assumes it's a file for which we have no source.
  1919.  
  1920. - Other miscellaneous improvements to the configure script and
  1921. Makefiles.
  1922.  
  1923. - The test suite now uses a different sound sample.
  1924.  
  1925. Built-in functions
  1926. ------------------
  1927.  
  1928. - Better checks for invalid input to int(), long(), string.atoi(),
  1929. string.atol().  (Formerly, a sign without digits would be accepted as
  1930. a legal ways to spell zero.)
  1931.  
  1932. - Changes to map() and filter() to use the length of a sequence only
  1933. as a hint -- if an IndexError happens earlier, take that.  (Formerly,
  1934. this was considered an error.)
  1935.  
  1936. - Experimental feature in getattr(): a third argument can specify a
  1937. default (instead of raising AttributeError).
  1938.  
  1939. - Implement round() slightly different, so that for negative ndigits
  1940. no additional errors happen in the last step.
  1941.  
  1942. - The open() function now adds the filename to the exception when it
  1943. fails.
  1944.  
  1945. Built-in exceptions
  1946. -------------------
  1947.  
  1948. - New standard exceptions EnvironmentError and PosixError.
  1949. EnvironmentError is the base class for IOError and PosixError;
  1950. PosixError is the same as os.error.  All this so that either exception
  1951. class can be instantiated with a third argument indicating a filename.
  1952. The built-in function open() and most os/posix functions that take a
  1953. filename argument now use this.
  1954.  
  1955. Built-in types
  1956. --------------
  1957.  
  1958. - List objects now have an experimental pop() method; l.pop() returns
  1959. and removes the last item; l.pop(i) returns and removes the item at
  1960. i.  Also, the sort() method is faster again.  Sorting is now also
  1961. safer: it is impossible for the sorting function to modify the list
  1962. while the sort is going on (which could cause core dumps).
  1963.  
  1964. - Changes to comparisons: numbers are now smaller than any other type.
  1965. This is done to prevent the circularity where [] < 0L < 1 < [] is
  1966. true.  As a side effect, cmp(None, 0) is now positive instead of
  1967. negative.  This *shouldn't* affect any working code, but I've found
  1968. that the change caused several "sleeping" bugs to become active, so
  1969. beware!
  1970.  
  1971. - Instance methods may now have other callable objects than just
  1972. Python functions as their im_func.  Use new.instancemethod() or write
  1973. your own C code to create them; new.instancemethod() may be called
  1974. with None for the instance to create an unbound method.
  1975.  
  1976. - Assignment to __name__, __dict__ or __bases__ of a class object is
  1977. now allowed (with stringent type checks); also allow assignment to
  1978. __getattr__ etc.  The cached values for __getattr__ etc. are
  1979. recomputed after such assignments (but not for derived classes :-( ).
  1980.  
  1981. - Allow assignment to some attributes of function objects: func_code,
  1982. func_defaults and func_doc / __doc__.  (With type checks except for
  1983. __doc__ / func_doc .)
  1984.  
  1985. Python services
  1986. ---------------
  1987.  
  1988. - New tests (in Lib/test): reperf.py (regular expression benchmark),
  1989. sortperf.py (list sorting benchmark), test_MimeWriter.py (test case
  1990. for the MimeWriter module).
  1991.  
  1992. - Generalized test/regrtest.py so that it is useful for testing other
  1993. packages.
  1994.  
  1995. - The ihooks.py module now understands package imports.
  1996.  
  1997. - In code.py, add a class that subsumes Fredrik Lundh's
  1998. PythonInterpreter class.  The interact() function now uses this.
  1999.  
  2000. - In rlcompleter.py, in completer(), return None instead of raising an
  2001. IndexError when there are no more completions left.
  2002.  
  2003. - Fixed the marshal module to test for certain common kinds of invalid
  2004. input.  (It's still not foolproof!)
  2005.  
  2006. - In the operator module, add an alias (now the preferred name)
  2007. "contains" for "sequenceincludes".
  2008.  
  2009. String Services
  2010. ---------------
  2011.  
  2012. - In the string and strop modules, in the replace() function, treat an
  2013. empty pattern as an error (since it's not clear what was meant!).
  2014.  
  2015. - Some speedups to re.py, especially the string substitution and split
  2016. functions.  Also added new function/method findall(), to find all
  2017. occurrences of a given substring.
  2018.  
  2019. - In cStringIO, add better argument type checking and support the
  2020. readonly 'closed' attribute (like regular files).
  2021.  
  2022. - In the struct module, unsigned 1-2 byte sized formats no longer
  2023. result in long integer values.
  2024.  
  2025. Miscellaneous services
  2026. ----------------------
  2027.  
  2028. - In whrandom.py, added new method and function randrange(), same as
  2029. choice(range(start, stop, step)) but faster.  This addresses the
  2030. problem that randint() was accidentally defined as taking an inclusive
  2031. range.  Also, randint(a, b) is now redefined as randrange(a, b+1),
  2032. adding extra range and type checking to its arguments!
  2033.  
  2034. - Add some semi-thread-safety to random.gauss() (it used to be able to 
  2035. crash when invoked from separate threads; now the worst it can do is
  2036. give a duplicate result occasionally).
  2037.  
  2038. - Some restructuring and generalization done to cmd.py.
  2039.  
  2040. - Major upgrade to ConfigParser.py; converted to using 're', added new 
  2041. exceptions, support underscore in section header and option name.  No
  2042. longer add 'name' option to every section; instead, add '__name__'.
  2043.  
  2044. - In getpass.py, don't use raw_input() to ask for the password -- we
  2045. don't want it to show up in the readline history!  Also don't catch
  2046. interrupts (the try-finally already does all necessary cleanup).
  2047.  
  2048. Generic OS Services
  2049. -------------------
  2050.  
  2051. - New functions in os.py: makedirs(), removedirs(), renames().  New
  2052. variable: linesep (the line separator as found in binary files,
  2053. i.e. '\n' on Unix, '\r\n' on DOS/Windows, '\r' on Mac.  Do *not* use
  2054. this with files opened in (default) text mode; the line separator used
  2055. will always be '\n'!
  2056.  
  2057. - Changes to the 'os.path' submodule of os.py: added getsize(),
  2058. getmtime(), getatime() -- these fetch the most popular items from the
  2059. stat return tuple.
  2060.  
  2061. - In the time module, add strptime(), if it exists.  (This parses a
  2062. time according to a format -- the inverse of strftime().)  Also,
  2063. remove the call to mktime() from strftime() -- it messed up the
  2064. formatting of some non-local times.
  2065.  
  2066. - In the socket module, added a new function gethostbyname_ex().
  2067. Also, don't use #ifdef to test for some symbols that are enums on some
  2068. platforms (and should exist everywhere).
  2069.  
  2070. Optional OS Services
  2071. --------------------
  2072.  
  2073. - Some fixes to gzip.py.  In particular, the readlines() method now
  2074. returns the lines *with* trailing newline characters, like readlines()
  2075. of regular file objects.  Also, it didn't work together with cPickle;
  2076. fixed that.
  2077.  
  2078. - In whichdb.py, support byte-swapped dbhash (bsddb) files.
  2079.  
  2080. - In anydbm.py, look at the type of an existing database to determine
  2081. which module to use to open it.  (The anydbm.error exception is now a
  2082. tuple.)
  2083.  
  2084. Unix Services
  2085. -------------
  2086.  
  2087. - In the termios module, in tcsetattr(), initialize the structure vy
  2088. calling tcgetattr().
  2089.  
  2090. - Added some of the "wait status inspection" macros as functions to
  2091. the posix module (and thus to the os module): WEXITSTATUS(),
  2092. WIFEXITED(), WIFSIGNALED(), WIFSTOPPED(), WSTOPSIG(), WTERMSIG().
  2093.  
  2094. - In the syslog module, make the default facility more intuitive
  2095. (matching the docs).
  2096.  
  2097. Debugger
  2098. --------
  2099.  
  2100. - In pdb.py, support for setting breaks on files/modules that haven't
  2101. been loaded yet.
  2102.  
  2103. Internet Protocols and Support
  2104. ------------------------------
  2105.  
  2106. - Changes in urllib.py; sped up unquote() and quote().  Fixed an
  2107. obscure bug in quote_plus().  Added urlencode(dict) -- convenience
  2108. function for sending a POST request with urlopen().  Use the getpass
  2109. module to ask for a password.  Rewrote the (test) main program so that
  2110. when used as a script, it can retrieve one or more URLs to stdout.
  2111. Use -t to run the self-test.  Made the proxy code work again.
  2112.  
  2113. - In cgi.py, treat "HEAD" the same as "GET", so that CGI scripts don't
  2114. fail when someone asks for their HEAD.  Also, for POST, set the
  2115. default content-type to application/x-www-form-urlencoded.  Also, in
  2116. FieldStorage.__init__(), when method='GET', always get the query
  2117. string from environ['QUERY_STRING'] or sys.argv[1] -- ignore an
  2118. explicitly passed in fp.
  2119.  
  2120. - The smtplib.py module now supports ESMTP and has improved standard
  2121. compliance, for picky servers.
  2122.  
  2123. - Improved imaplib.py.
  2124.  
  2125. - Fixed UDP support in SocketServer.py (it never worked).
  2126.  
  2127. - Fixed a small bug in CGIHTTPServer.py.
  2128.  
  2129. Internet Data handling
  2130. ----------------------
  2131.  
  2132. - In rfc822.py, add a new class AddressList.  Also support a new
  2133. overridable method, isheader().  Also add a get() method similar to
  2134. dictionaries (and make getheader() an alias for it).  Also, be smarter
  2135. about seekable (test whether fp.tell() works) and test for presence of
  2136. unread() method before trying seeks.
  2137.  
  2138. - In sgmllib.py, restore the call to report_unbalanced() that was lost
  2139. long ago.  Also some other improvements: handle <? processing
  2140. instructions >, allow . and - in entity names, and allow \r\n as line
  2141. separator.
  2142.  
  2143. - Some restructuring and generalization done to multifile.py; support
  2144. a 'seekable' flag.
  2145.  
  2146. Restricted Execution
  2147. --------------------
  2148.  
  2149. - Improvements to rexec.py: package support; support a (minimal)
  2150. sys.exc_info().  Also made the (test) main program a bit fancier (you
  2151. can now use it to run arbitrary Python scripts in restricted mode).
  2152.  
  2153. Tkinter
  2154. -------
  2155.  
  2156. - On Unix, Tkinter can now safely be used from a multi-threaded
  2157. application.  (Formerly, no threads would make progress while
  2158. Tkinter's mainloop() was active, because it didn't release the Python
  2159. interpreter lock.)  Unfortunately, on Windows, threads other than the
  2160. main thread should not call update() or update_idletasks() because
  2161. this will deadlock the application.
  2162.  
  2163. - An interactive interpreter that uses readline and Tkinter no longer
  2164. uses up all available CPU time.
  2165.  
  2166. - Even if readline is not used, Tk windows created in an interactive
  2167. interpreter now get continuously updated.  (This even works in Windows
  2168. as long as you don't hit a key.)
  2169.  
  2170. - New demos in Demo/tkinter/guido/: brownian.py, redemo.py, switch.py.
  2171.  
  2172. - No longer register Tcl_finalize() as a low-level exit handler.  It
  2173. may call back into Python, and that's a bad idea.
  2174.  
  2175. - Allow binding of Tcl commands (given as a string).
  2176.  
  2177. - Some minor speedups; replace explicitly coded getint() with int() in
  2178. most places.
  2179.  
  2180. - In FileDialog.py, remember the directory of the selected file, if
  2181. given.
  2182.  
  2183. - Change the names of all methods in the Wm class: they are now
  2184. wm_title(), etc.  The old names (title() etc.) are still defined as
  2185. aliases.
  2186.  
  2187. - Add a new method of interpreter objects, interpaddr().  This returns
  2188. the address of the Tcl interpreter object, as an integer.  Not very
  2189. useful for the Python programmer, but this can be called by another C
  2190. extension that needs to make calls into the Tcl/Tk C API and needs to
  2191. get the address of the Tcl interpreter object.  A simple cast of the
  2192. return value to (Tcl_Interp *) will do the trick.
  2193.  
  2194. Windows General
  2195. ---------------
  2196.  
  2197. - Don't insist on proper case for module source files if the filename
  2198. is all uppercase (e.g. FOO.PY now matches foo; but FOO.py still
  2199. doesn't).  This should address problems with this feature on
  2200. oldfashioned filesystems (Novell servers?).
  2201.  
  2202. Windows Library
  2203. ---------------
  2204.  
  2205. - os.environ is now all uppercase, but accesses are case insensitive,
  2206. and the putenv() calls made as a side effect of changing os.environ
  2207. are case preserving.
  2208.  
  2209. - Removed samefile(), sameopenfile(), samestat() from os.path (aka
  2210. ntpath.py) -- these cannot be made to work reliably (at least I
  2211. wouldn't know how).
  2212.  
  2213. - Fixed os.pipe() so that it returns file descriptors acceptable to
  2214. os.read() and os.write() (like it does on Unix), rather than Windows
  2215. file handles.
  2216.  
  2217. - Added a table of WSA error codes to socket.py.
  2218.  
  2219. - In the select module, put the (huge) file descriptor arrays on the
  2220. heap.
  2221.  
  2222. - The getpass module now raises KeyboardInterrupt when it sees ^C.
  2223.  
  2224. - In mailbox.py, fix tell/seek when using files opened in text mode.
  2225.  
  2226. - In rfc822.py, fix tell/seek when using files opened in text mode.
  2227.  
  2228. - In the msvcrt extension module, release the interpreter lock for
  2229. calls that may block: _locking(), _getch(), _getche().  Also fix a
  2230. bogus error return when open_osfhandle() doesn't have the right
  2231. argument list.
  2232.  
  2233. Windows Installer
  2234. -----------------
  2235.  
  2236. - The registry key used is now "1.5" instead of "1.5.x" -- so future
  2237. versions of 1.5 and Mark Hammond's win32all installer don't need to be 
  2238. resynchronized.
  2239.  
  2240. Windows Tools
  2241. -------------
  2242.  
  2243. - Several improvements to freeze specifically for Windows.
  2244.  
  2245. Windows Build Procedure
  2246. -----------------------
  2247.  
  2248. - The VC++ project files and the WISE installer have been moved to the
  2249. PCbuild subdirectory, so they are distributed in the same subdirectory
  2250. where they must be used.  This avoids confusion.
  2251.  
  2252. - New project files for Windows 3.1 port by Jim Ahlstrom.
  2253.  
  2254. - Got rid of the obsolete subdirectory PC/setup_nt/.
  2255.  
  2256. - The projects now use distinct filenames for the .exe, .dll, .lib and
  2257. .pyd files built in debug mode (by appending "_d" to the base name,
  2258. before the extension).  This makes it easier to switch between the two
  2259. and get the right versions.  There's a pragma in config.h that directs
  2260. the linker to include the appropriate .lib file (so python15.lib no
  2261. longer needs to be explicit in your project).
  2262.  
  2263. - The installer now installs more files (e.g. config.h).  The idea is
  2264. that you shouldn't need the source distribution if you want build your
  2265. own extensions in C or C++.
  2266.  
  2267. Tools and Demos
  2268. ---------------
  2269.  
  2270. - New script nm2def.py by Marc-Andre Lemburg, to construct
  2271. PC/python_nt.def automatically (some hand editing still required).
  2272.  
  2273. - New tool ndiff.py: Tim Peters' text diffing tool.
  2274.  
  2275. - Various and sundry improvements to the freeze script.
  2276.  
  2277. - The script texi2html.py (which was part of the Doc tree but is no
  2278. longer used there) has been moved to the Tools/scripts subdirectory.
  2279.  
  2280. - Some generalizations in the webchecker code.  There's now a
  2281. primnitive gui for websucker.py: wsgui.py.  (In Tools/webchecker/.)
  2282.  
  2283. - The ftpmirror.py script now handles symbolic links properly, and
  2284. also files with multiple spaces in their names.
  2285.  
  2286. - The 1.5.1 tabnanny.py suffers an assert error if fed a script whose
  2287. last line is both indented and lacks a newline.  This is now fixed.
  2288.  
  2289. Python/C API
  2290. ------------
  2291.  
  2292. - Added missing prototypes for PyEval_CallFunction() and
  2293. PyEval_CallMethod().
  2294.  
  2295. - New macro PyList_SET_ITEM().
  2296.  
  2297. - New macros to access object members for PyFunction, PyCFunction
  2298. objects.
  2299.  
  2300. - New APIs PyImport_AppendInittab() an PyImport_ExtendInittab() to
  2301. dynamically add one or many entries to the table of built-in modules.
  2302.  
  2303. - New macro Py_InitModule3(name, methods, doc) which calls
  2304. Py_InitModule4() with appropriate arguments.  (The -4 variant requires 
  2305. you to pass an obscure version number constant which is always the same.)
  2306.  
  2307. - New APIs PySys_WriteStdout() and PySys_WriteStderr() to write to
  2308. sys.stdout or sys.stderr using a printf-like interface.  (Used in
  2309. _tkinter.c, for example.)
  2310.  
  2311. - New APIs for conversion between Python longs and C 'long long' if
  2312. your compiler supports it.
  2313.  
  2314. - PySequence_In() is now called PySequence_Contains().
  2315. (PySequence_In() is still supported for b/w compatibility; it is
  2316. declared obsolete because its argument order is confusing.)
  2317.  
  2318. - PyDict_GetItem() and PyDict_GetItemString() are changed so that they
  2319. *never* raise an exception -- (even if the hash() fails, simply clear
  2320. the error).  This was necessary because there is lots of code out
  2321. there that already assumes this.
  2322.  
  2323. - Changes to PySequence_Tuple() and PySequence_List() to use the
  2324. length of a sequence only as a hint -- if an IndexError happens
  2325. earlier, take that.  (Formerly, this was considered an error.)
  2326.  
  2327. - Reformatted abstract.c to give it a more familiar "look" and fixed
  2328. many error checking bugs.
  2329.  
  2330. - Add NULL pointer checks to all calls of a C function through a type
  2331. object and extensions (e.g. nb_add).
  2332.  
  2333. - The code that initializes sys.path now calls Py_GetPythonHome()
  2334. instead of getenv("PYTHONHOME").  This, together with the new API
  2335. Py_SetPythonHome(), makes it easier for embedding applications to
  2336. change the notion of Python's "home" directory (where the libraries
  2337. etc. are sought).
  2338.  
  2339. - Fixed a very old bug in the parsing of "O?" format specifiers.
  2340.  
  2341.  
  2342. ======================================================================
  2343.  
  2344.  
  2345. From 1.5 to 1.5.1
  2346. =================
  2347.  
  2348. General
  2349. -------
  2350.  
  2351. - The documentation is now unbundled.  It has also been extensively
  2352. modified (mostly to implement a new and more uniform formatting
  2353. style).  We figure that most people will prefer to download one of the
  2354. preformatted documentation sets (HTML, PostScript or PDF) and that
  2355. only a minority have a need for the LaTeX or FrameMaker sources.  Of
  2356. course, the unbundled documentation sources still released -- just not
  2357. in the same archive file, and perhaps not on the same date.
  2358.  
  2359. - All bugs noted on the errors page (and many unnoted) are fixed.  All
  2360. new bugs take their places.
  2361.  
  2362. - No longer a core dump when attempting to print (or repr(), or str())
  2363. a list or dictionary that contains an instance of itself; instead, the
  2364. recursive entry is printed as [...] or {...}.  See Py_ReprEnter() and
  2365. Py_ReprLeave() below.  Comparisons of such objects still go beserk,
  2366. since this requires a different kind of fix; fortunately, this is a
  2367. less common scenario in practice.
  2368.  
  2369. Syntax change
  2370. -------------
  2371.  
  2372. - The raise statement can now be used without arguments, to re-raise 
  2373. a previously set exception.  This should be used after catching an
  2374. exception with an except clause only, either in the except clause or
  2375. later in the same function.
  2376.  
  2377. Import and module handling
  2378. --------------------------
  2379.  
  2380. - The implementation of import has changed to use a mutex (when
  2381. threading is supported).  This means that when two threads
  2382. simultaneously import the same module, the import statements are
  2383. serialized.  Recursive imports are not affected.
  2384.  
  2385. - Rewrote the finalization code almost completely, to be much more
  2386. careful with the order in which modules are destroyed.  Destructors
  2387. will now generally be able to reference built-in names such as None
  2388. without trouble.
  2389.  
  2390. - Case-insensitive platforms such as Mac and Windows require the case
  2391. of a module's filename to match the case of the module name as
  2392. specified in the import statement (see below).
  2393.  
  2394. - The code for figuring out the default path now distinguishes between
  2395. files, modules, executable files, and directories.  When expecting a
  2396. module, we also look for the .pyc or .pyo file.
  2397.  
  2398. Parser/tokenizer changes
  2399. ------------------------
  2400.  
  2401. - The tokenizer can now warn you when your source code mixes tabs and
  2402. spaces for indentation in a manner that depends on how much a tab is
  2403. worth in spaces.  Use "python -t" or "python -v" to enable this
  2404. option.  Use "python -tt" to turn the warnings into errors.  (See also
  2405. tabnanny.py and tabpolice.py below.)
  2406.  
  2407. - Return unsigned characters from tok_nextc(), so '\377' isn't
  2408. mistaken for an EOF character.
  2409.  
  2410. - Fixed two pernicious bugs in the tokenizer that only affected AIX.
  2411. One was actually a general bug that was triggered by AIX's smaller I/O
  2412. buffer size.  The other was a bug in the AIX optimizer's loop
  2413. unrolling code; swapping two statements made the problem go away.
  2414.  
  2415. Tools, demos and miscellaneous files
  2416. ------------------------------------
  2417.  
  2418. - There's a new version of Misc/python-mode.el (the Emacs mode for
  2419. Python) which is much smarter about guessing the indentation style
  2420. used in a particular file.  Lots of other cool features too!
  2421.  
  2422. - There are two new tools in Tools/scripts: tabnanny.py and
  2423. tabpolice.py, implementing two different ways of checking whether a
  2424. file uses indentation in a way that is sensitive to the interpretation
  2425. of a tab.  The preferred module is tabnanny.py (by Tim Peters).
  2426.  
  2427. - Some new demo programs:
  2428.  
  2429.     Demo/tkinter/guido/paint.py -- Dave Mitchell
  2430.     Demo/sockets/unixserver.py -- Piet van Oostrum
  2431.     
  2432.  
  2433. - Much better freeze support.  The freeze script can now freeze
  2434. hierarchical module names (with a corresponding change to import.c),
  2435. and has a few extra options (e.g. to suppress freezing specific
  2436. modules).  It also does much more on Windows NT.
  2437.  
  2438. - Version 1.0 of the faq wizard is included (only very small changes
  2439. since version 0.9.0).
  2440.  
  2441. - New feature for the ftpmirror script: when removing local files
  2442. (i.e., only when -r is used), do a recursive delete.
  2443.  
  2444. Configuring and building Python
  2445. -------------------------------
  2446.  
  2447. - Get rid of the check for -linet -- recent Sequent Dynix systems don't
  2448. need this any more and apparently it screws up their configuration.
  2449.  
  2450. - Some changes because gcc on SGI doesn't support '-all'.
  2451.  
  2452. - Changed the build rules to use $(LIBRARY) instead of
  2453.   -L.. -lpython$(VERSION)
  2454. since the latter trips up the SunOS 4.1.x linker (sigh).
  2455.  
  2456. - Fix the bug where the '# dgux is broken' comment in the Makefile
  2457. tripped over Make on some platforms.
  2458.  
  2459. - Changes for AIX: install the python.exp file; properly use
  2460. $(srcdir); the makexp_aix script now removes C++ entries of the form
  2461. Class::method.
  2462.  
  2463. - Deleted some Makefile targets only used by the (long obsolete)
  2464. gMakefile hacks.
  2465.  
  2466. Extension modules
  2467. -----------------
  2468.  
  2469. - Performance and threading improvements to the socket and bsddb
  2470. modules, by Christopher Lindblad of Infoseek.
  2471.  
  2472. - Added operator.__not__ and operator.not_.
  2473.  
  2474. - In the thread module, when a thread exits due to an unhandled
  2475. exception, don't store the exception information in sys.last_*; it
  2476. prevents proper calling of destructors of local variables.
  2477.  
  2478. - Fixed a number of small bugs in the cPickle module.
  2479.  
  2480. - Changed find() and rfind() in the strop module so that
  2481. find("x","",2) returns -1, matching the implementation in string.py.
  2482.  
  2483. - In the time module, be more careful with the result of ctime(), and
  2484. test for HAVE_MKTIME before usinmg mktime().
  2485.  
  2486. - Doc strings contributed by Mitch Chapman to the termios, pwd, gdbm
  2487. modules.
  2488.  
  2489. - Added the LOG_SYSLOG constant to the syslog module, if defined.
  2490.  
  2491. Standard library modules
  2492. ------------------------
  2493.  
  2494. - All standard library modules have been converted to an indentation
  2495. style using either only tabs or only spaces -- never a mixture -- if
  2496. they weren't already consistent according to tabnanny.  This means
  2497. that the new -t option (see above) won't complain about standard
  2498. library modules.
  2499.  
  2500. - New standard library modules:
  2501.  
  2502.     threading -- GvR and the thread-sig
  2503.         Java style thread objects -- USE THIS!!!
  2504.  
  2505.     getpass -- Piers Lauder
  2506.         simple utilities to prompt for a password and to
  2507.         retrieve the current username
  2508.  
  2509.     imaplib -- Piers Lauder
  2510.         interface for the IMAP4 protocol
  2511.  
  2512.     poplib -- David Ascher, Piers Lauder
  2513.         interface for the POP3 protocol
  2514.  
  2515.     smtplib -- Dragon De Monsyne
  2516.         interface for the SMTP protocol
  2517.  
  2518. - Some obsolete modules moved to a separate directory (Lib/lib-old)
  2519. which is *not* in the default module search path:
  2520.  
  2521.     Para
  2522.     addpack
  2523.     codehack
  2524.     fmt
  2525.     lockfile
  2526.     newdir
  2527.     ni
  2528.     rand
  2529.     tb
  2530.  
  2531. - New version of the PCRE code (Perl Compatible Regular Expressions --
  2532. the re module and the supporting pcre extension) by Andrew Kuchling.
  2533. Incompatible new feature in re.sub(): the handling of escapes in the
  2534. replacement string has changed.
  2535.  
  2536. - Interface change in the copy module: a __deepcopy__ method is now
  2537. called with the memo dictionary as an argument.
  2538.  
  2539. - Feature change in the tokenize module: differentiate between NEWLINE
  2540. token (an official newline) and NL token (a newline that the grammar
  2541. ignores).
  2542.  
  2543. - Several bugfixes to the urllib module.  It is now truly thread-safe,
  2544. and several bugs and a portability problem have been fixed.  New
  2545. features, all due to Sjoerd Mullender: When creating a temporary file,
  2546. it gives it an appropriate suffix.  Support the "data:" URL scheme.
  2547. The open() method uses the tempcache.
  2548.  
  2549. - New version of the xmllib module (this time with a test suite!) by
  2550. Sjoerd Mullender.
  2551.  
  2552. - Added debugging code to the telnetlib module, to be able to trace
  2553. the actual traffic.
  2554.  
  2555. - In the rfc822 module, added support for deleting a header (still no
  2556. support for adding headers, though).  Also fixed a bug where an
  2557. illegal address would cause a crash in getrouteaddr(), fixed a
  2558. sign reversal in mktime_tz(), and use the local timezone by default
  2559. (the latter two due to Bill van Melle).
  2560.  
  2561. - The normpath() function in the dospath and ntpath modules no longer
  2562. does case normalization -- for that, use the separate function
  2563. normcase() (which always existed); normcase() has been sped up and
  2564. fixed (it was the cause of a crash in Mark Hammond's installer in
  2565. certain locales).
  2566.  
  2567. - New command supported by the ftplib module: rmd(); also fixed some
  2568. minor bugs.
  2569.  
  2570. - The profile module now uses a different timer function by default -- 
  2571. time.clock() is generally better than os.times().  This makes it work
  2572. better on Windows NT, too.
  2573.  
  2574. - The tempfile module now recovers when os.getcwd() raises an
  2575. exception.
  2576.  
  2577. - Fixed some bugs in the random module; gauss() was subtly wrong, and
  2578. vonmisesvariate() should return a full circle.  Courtesy Mike Miller,
  2579. Lambert Meertens (gauss()), and Magnus Kessler (vonmisesvariate()).
  2580.  
  2581. - Better default seed in the whrandom module, courtesy Andrew Kuchling.
  2582.  
  2583. - Fix slow close() in shelve module.
  2584.  
  2585. - The Unix mailbox class in the mailbox module is now more robust when
  2586. a line begins with the string "From " but is definitely not the start
  2587. of a new message.  The pattern used can be changed by overriding a
  2588. method or class variable.
  2589.  
  2590. - Added a rmtree() function to the copy module.
  2591.  
  2592. - Fixed several typos in the pickle module.  Also fixed problems when
  2593. unpickling in restricted execution environments.
  2594.  
  2595. - Added docstrings and fixed a typo in the py_compile and compileall
  2596. modules.  At Mark Hammond's repeated request, py_compile now append a
  2597. newline to the source if it needs one.  Both modules support an extra
  2598. parameter to specify the purported source filename (to be used in
  2599. error messages).
  2600.  
  2601. - Some performance tweaks by Jeremy Hylton to the gzip module.
  2602.  
  2603. - Fixed a bug in the merge order of dictionaries in the ConfigParser
  2604. module.  Courtesy Barry Warsaw.
  2605.  
  2606. - In the multifile module, support the optional second parameter to
  2607. seek() when possible.
  2608.  
  2609. - Several fixes to the gopherlib module by Lars Marius Garshol.  Also, 
  2610. urlparse now correctly handles Gopher URLs with query strings.
  2611.  
  2612. - Fixed a tiny bug in format_exception() in the traceback module.
  2613. Also rewrite tb_lineno() to be compatible with JPython (and not
  2614. disturb the current exception!); by Jim Hugunin.
  2615.  
  2616. - The httplib module is more robust when servers send a short response 
  2617. -- courtesy Tim O'Malley.
  2618.  
  2619. Tkinter and friends
  2620. -------------------
  2621.  
  2622. - Various typos and bugs fixed.
  2623.  
  2624. - New module Tkdnd implements a drag-and-drop protocol (within one
  2625. application only).
  2626.  
  2627. - The event_*() widget methods have been restructured slightly -- they
  2628. no longer use the default root.
  2629.  
  2630. - The interfaces for the bind*() and unbind() widget methods have been
  2631. redesigned; the bind*() methods now return the name of the Tcl command 
  2632. created for the callback, and this can be passed as a optional
  2633. argument to unbind() in order to delete the command (normally, such
  2634. commands are automatically unbound when the widget is destroyed, but
  2635. for some applications this isn't enough).
  2636.  
  2637. - Variable objects now have trace methods to interface to Tcl's
  2638. variable tracing facilities.
  2639.  
  2640. - Image objects now have an optional keyword argument, 'master', to
  2641. specify a widget (tree) to which they belong.  The image_names() and
  2642. image_types() calls are now also widget methods.
  2643.  
  2644. - There's a new global call, Tkinter.NoDefaultRoot(), which disables
  2645. all use of the default root by the Tkinter library.  This is useful to
  2646. debug applications that are in the process of being converted from
  2647. relying on the default root to explicit specification of the root
  2648. widget.
  2649.  
  2650. - The 'exit' command is deleted from the Tcl interpreter, since it
  2651. provided a loophole by which one could (accidentally) exit the Python
  2652. interpreter without invoking any cleanup code.
  2653.  
  2654. - Tcl_Finalize() is now registered as a Python low-level exit handle,
  2655. so Tcl will be finalized when Python exits.
  2656.  
  2657. The Python/C API
  2658. ----------------
  2659.  
  2660. - New function PyThreadState_GetDict() returns a per-thread dictionary
  2661. intended for storing thread-local global variables.
  2662.  
  2663. - New functions Py_ReprEnter() and Py_ReprLeave() use the per-thread
  2664. dictionary to allow recursive container types to detect recursion in
  2665. their repr(), str() and print implementations.
  2666.  
  2667. - New function PyObject_Not(x) calculates (not x) according to Python's 
  2668. standard rules (basically, it negates the outcome PyObject_IsTrue(x).
  2669.  
  2670. - New function _PyModule_Clear(), which clears a module's dictionary
  2671. carefully without removing the __builtins__ entry.  This is implied
  2672. when a module object is deallocated (this used to clear the dictionary
  2673. completely).
  2674.  
  2675. - New function PyImport_ExecCodeModuleEx(), which extends
  2676. PyImport_ExecCodeModule() by adding an extra parameter to pass it the
  2677. true file.
  2678.  
  2679. - New functions Py_GetPythonHome() and Py_SetPythonHome(), intended to
  2680. allow embedded applications to force a different value for PYTHONHOME.
  2681.  
  2682. - New global flag Py_FrozenFlag is set when this is a "frozen" Python
  2683. binary; it suppresses warnings about not being able to find the
  2684. standard library directories.
  2685.  
  2686. - New global flag Py_TabcheckFlag is incremented by the -t option and
  2687. causes the tokenizer to issue warnings or errors about inconsistent
  2688. mixing of tabs and spaces for indentation.
  2689.  
  2690. Miscellaneous minor changes and bug fixes
  2691. -----------------------------------------
  2692.  
  2693. - Improved the error message when an attribute of an attribute-less
  2694. object is requested -- include the name of the attribute and the type
  2695. of the object in the message.
  2696.  
  2697. - Sped up int(), long(), float() a bit.
  2698.  
  2699. - Fixed a bug in list.sort() that would occasionally dump core.
  2700.  
  2701. - Fixed a bug in PyNumber_Power() that caused numeric arrays to fail
  2702. when taken tothe real power.
  2703.  
  2704. - Fixed a number of bugs in the file reading code, at least one of
  2705. which could cause a core dump on NT, and one of which would
  2706. occasionally cause file.read() to return less than the full contents
  2707. of the file.
  2708.  
  2709. - Performance hack by Vladimir Marangozov for stack frame creation.
  2710.  
  2711. - Make sure setvbuf() isn't used unless HAVE_SETVBUF is defined.
  2712.  
  2713. Windows 95/NT
  2714. -------------
  2715.  
  2716. - The .lib files are now part of the distribution; they are collected
  2717. in the subdirectory "libs" of the installation directory.
  2718.  
  2719. - The extension modules (.pyd files) are now collected in a separate
  2720. subdirectory of the installation directory named "DLLs".
  2721.  
  2722. - The case of a module's filename must now match the case of the
  2723. module name as specified in the import statement.  This is an
  2724. experimental feature -- if it turns out to break in too many
  2725. situations, it will be removed (or disabled by default) in the future.
  2726. It can be disabled on a per-case basis by setting the environment
  2727. variable PYTHONCASEOK (to any value).
  2728.  
  2729.  
  2730. ======================================================================
  2731.  
  2732.  
  2733. From 1.5b2 to 1.5
  2734. =================
  2735.  
  2736. - Newly documentated module: BaseHTTPServer.py, thanks to Greg Stein.
  2737.  
  2738. - Added doc strings to string.py, stropmodule.c, structmodule.c,
  2739. thanks to Charles Waldman.
  2740.  
  2741. - Many nits fixed in the manuals, thanks to Fred Drake and many others
  2742. (especially Rob Hooft and Andrew Kuchling).  The HTML version now uses
  2743. HTML markup instead of inline GIF images for tables; only two images
  2744. are left (for obsure bits of math).  The index of the HTML version has
  2745. also been much improved.  Finally, it is once again possible to
  2746. generate an Emacs info file from the library manual (but I don't
  2747. commit to supporting this in future versions).
  2748.  
  2749. - New module: telnetlib.py (a simple telnet client library).
  2750.  
  2751. - New tool: Tools/versioncheck/, by Jack Jansen.
  2752.  
  2753. - Ported zlibmodule.c and bsddbmodule.c to NT; The project file for MS
  2754. DevStudio 5.0 now includes new subprojects to build the zlib and bsddb
  2755. extension modules.
  2756.  
  2757. - Many small changes again to Tkinter.py -- mostly bugfixes and adding
  2758. missing routines.  Thanks to Greg McFarlane for reporting a bunch of
  2759. problems and proofreading my fixes.
  2760.  
  2761. - The re module and its documentation are up to date with the latest
  2762. version released to the string-sig (Dec. 22).
  2763.  
  2764. - Stop test_grp.py from failing when the /etc/group file is empty
  2765. (yes, this happens!).
  2766.  
  2767. - Fix bug in integer conversion (mystrtoul.c) that caused
  2768. 4294967296==0 to be true!
  2769.  
  2770. - The VC++ 4.2 project file should be complete again.
  2771.  
  2772. - In tempfile.py, use a better template on NT, and add a new optional
  2773. argument "suffix" with default "" to specify a specific extension for
  2774. the temporary filename (needed sometimes on NT but perhaps also handy
  2775. elsewhere).
  2776.  
  2777. - Fixed some bugs in the FAQ wizard, and converted it to use re
  2778. instead of regex.
  2779.  
  2780. - Fixed a mysteriously undetected error in dlmodule.c (it was using a
  2781. totally bogus routine name to raise an exception).
  2782.  
  2783. - Fixed bug in import.c which wasn't using the new "dos-8x3" name yet.
  2784.  
  2785. - Hopefully harmless changes to the build process to support shared
  2786. libraries on DG/UX.  This adds a target to create
  2787. libpython$(VERSION).so; however this target is *only* for DG/UX.
  2788.  
  2789. - Fixed a bug in the new format string error checking in getargs.c.
  2790.  
  2791. - A simple fix for infinite recursion when printing __builtins__:
  2792. reset '_' to None before printing and set it to the printed variable
  2793. *after* printing (and only when printing is successful).
  2794.  
  2795. - Fixed lib-tk/SimpleDialog.py to keep the dialog visible even if the
  2796. parent window is not (Skip Montanaro).
  2797.  
  2798. - Fixed the two most annoying problems with ftp URLs in
  2799. urllib.urlopen(); an empty file now correctly raises an error, and it
  2800. is no longer required to explicitly close the returned "file" object
  2801. before opening another ftp URL to the same host and directory.
  2802.  
  2803.  
  2804. ======================================================================
  2805.  
  2806.  
  2807. From 1.5b1 to 1.5b2
  2808. ===================
  2809.  
  2810. - Fixed a bug in cPickle.c that caused it to crash right away because
  2811. the version string had a different format.
  2812.  
  2813. - Changes in pickle.py and cPickle.c: when unpickling an instance of a
  2814. class that doesn't define the __getinitargs__() method, the __init__()
  2815. constructor is no longer called.  This makes a much larger group of
  2816. classes picklable by default, but may occasionally change semantics.
  2817. To force calling __init__() on unpickling, define a __getinitargs__()
  2818. method.  Other changes too, in particular cPickle now handles classes
  2819. defined in packages correctly.  The same change applies to copying
  2820. instances with copy.py.  The cPickle.c changes and some pickle.py
  2821. changes are courtesy Jim Fulton.
  2822.  
  2823. - Locale support in he "re" (Perl regular expressions) module.  Use 
  2824. the flag re.L (or re.LOCALE) to enable locale-specific matching
  2825. rules for \w and \b.  The in-line syntax for this flag is (?L).
  2826.  
  2827. - The built-in function isinstance(x, y) now also succeeds when y is
  2828. a type object and type(x) is y.
  2829.  
  2830. - repr() and str() of class and instance objects now reflect the
  2831. package/module in which the class is defined.
  2832.  
  2833. - Module "ni" has been removed.  (If you really need it, it's been
  2834. renamed to "ni1".  Let me know if this causes any problems for you.
  2835. Package authors are encouraged to write __init__.py files that
  2836. support both ni and 1.5 package support, so the same version can be
  2837. used with Python 1.4 as well as 1.5.)
  2838.  
  2839. - The thread module is now automatically included when threads are
  2840. configured.  (You must remove it from your existing Setup file,
  2841. since it is now in its own Setup.thread file.)
  2842.  
  2843. - New command line option "-x" to skip the first line of the script;
  2844. handy to make executable scripts on non-Unix platforms.
  2845.  
  2846. - In importdl.c, add the RTLD_GLOBAL to the dlopen() flags.  I
  2847. haven't checked how this affects things, but it should make symbols
  2848. in one shared library available to the next one.
  2849.  
  2850. - The Windows installer now installs in the "Program Files" folder on
  2851. the proper volume by default.
  2852.  
  2853. - The Windows configuration adds a new main program, "pythonw", and
  2854. registers a new extension, ".pyw" that invokes this.  This is a
  2855. pstandard Python interpreter that does not pop up a console window;
  2856. handy for pure Tkinter applications.  All output to the original
  2857. stdout and stderr is lost; reading from the original stdin yields
  2858. EOF.  Also, both python.exe and pythonw.exe now have a pretty icon
  2859. (a green snake in a box, courtesy Mark Hammond).
  2860.  
  2861. - Lots of improvements to emacs-mode.el again.  See Barry's web page:
  2862. http://www.python.org/ftp/emacs/pmdetails.html.
  2863.  
  2864. - Lots of improvements and additions to the library reference manual;
  2865. many by Fred Drake.
  2866.  
  2867. - Doc strings for the following modules: rfc822.py, posixpath.py,
  2868. ntpath.py, httplib.py.  Thanks to Mitch Chapman and Charles Waldman.
  2869.  
  2870. - Some more regression testing.
  2871.  
  2872. - An optional 4th (maxsplit) argument to strop.replace().
  2873.  
  2874. - Fixed handling of maxsplit in string.splitfields().
  2875.  
  2876. - Tweaked os.environ so it can be pickled and copied.
  2877.  
  2878. - The portability problems caused by indented preprocessor commands
  2879. and C++ style comments should be gone now.
  2880.  
  2881. - In random.py, added Pareto and Weibull distributions.
  2882.  
  2883. - The crypt module is now disabled in Modules/Setup.in by default; it
  2884. is rarely needed and causes errors on some systems where users often
  2885. don't know how to deal with those.
  2886.  
  2887. - Some improvements to the _tkinter build line suggested by Case Roole.
  2888.  
  2889. - A full suite of platform specific files for NetBSD 1.x, submitted by 
  2890. Anders Andersen.
  2891.  
  2892. - New Solaris specific header STROPTS.py.
  2893.  
  2894. - Moved a confusing occurrence of *shared* from the comments in
  2895. Modules/Setup.in (people would enable this one instead of the real
  2896. one, and get disappointing results).
  2897.  
  2898. - Changed the default mode for directories to be group-writable when
  2899. the installation process creates them.
  2900.  
  2901. - Check for pthread support in "-l_r" for FreeBSD/NetBSD, and support
  2902. shared libraries for both.
  2903.  
  2904. - Support FreeBSD and NetBSD in posixfile.py.
  2905.  
  2906. - Support for the "event" command, new in Tk 4.2.  By Case Roole.
  2907.  
  2908. - Add Tix_SafeInit() support to tkappinit.c.
  2909.  
  2910. - Various bugs fixed in "re.py" and "pcre.c".
  2911.  
  2912. - Fixed a bug (broken use of the syntax table) in the old "regexpr.c".
  2913.  
  2914. - In frozenmain.c, stdin is made unbuffered too when PYTHONUNBUFFERED
  2915. is set.
  2916.  
  2917. - Provide default blocksize for retrbinary in ftplib.py (Skip
  2918. Montanaro).
  2919.  
  2920. - In NT, pick the username up from different places in user.py (Jeff
  2921. Bauer).
  2922.  
  2923. - Patch to urlparse.urljoin() for ".." and "..#1", Marc Lemburg.
  2924.  
  2925. - Many small improvements to Jeff Rush' OS/2 support.
  2926.  
  2927. - ospath.py is gone; it's been obsolete for so many years now...
  2928.  
  2929. - The reference manual is now set up to prepare better HTML (still
  2930. using webmaker, alas).
  2931.  
  2932. - Add special handling to /Tools/freeze for Python modules that are
  2933. imported implicitly by the Python runtime: 'site' and 'exceptions'.
  2934.  
  2935. - Tools/faqwiz 0.8.3 -- add an option to suppress URL processing
  2936. inside <PRE>, by "Scott".
  2937.  
  2938. - Added ConfigParser.py, a generic parser for sectioned configuration
  2939. files.
  2940.  
  2941. - In _localemodule.c, LC_MESSAGES is not always defined; put it
  2942. between #ifdefs.
  2943.  
  2944. - Typo in resource.c: RUSAGE_CHILDERN -> RUSAGE_CHILDREN.
  2945.  
  2946. - Demo/scripts/newslist.py: Fix the way the version number is gotten
  2947. out of the RCS revision.
  2948.  
  2949. - PyArg_Parse[Tuple] now explicitly check for bad characters at the
  2950. end of the format string.
  2951.  
  2952. - Revamped PC/example_nt to support VC++ 5.x.
  2953.  
  2954. - <listobject>.sort() now uses a modified quicksort by Raymund Galvin,
  2955. after studying the GNU libg++ quicksort.  This should be much faster
  2956. if there are lots of duplicates, and otherwise at least as good.
  2957.  
  2958. - Added "uue" as an alias for "uuencode" to mimetools.py.  (Hm, the
  2959. uudecode bug where it complaints about trailing garbage is still there 
  2960. :-( ).
  2961.  
  2962. - pickle.py requires integers in text mode to be in decimal notation
  2963. (it used to accept octal and hex, even though it would only generate
  2964. decimal numbers).
  2965.  
  2966. - In string.atof(), don't fail when the "re" module is unavailable.
  2967. Plug the ensueing security leak by supplying an empty __builtins__
  2968. directory to eval().
  2969.  
  2970. - A bunch of small fixes and improvements to Tkinter.py.
  2971.  
  2972. - Fixed a buffer overrun in PC/getpathp.c.
  2973.  
  2974.  
  2975. ======================================================================
  2976.  
  2977.  
  2978. From 1.5a4 to 1.5b1
  2979. ===================
  2980.  
  2981. - The Windows NT/95 installer now includes full HTML of all manuals.
  2982. It also has a checkbox that lets you decide whether to install the
  2983. interpreter and library.  The WISE installer script for the installer
  2984. is included in the source tree as PC/python15.wse, and so are the
  2985. icons used for Python files.  The config.c file for the Windows build
  2986. is now complete with the pcre module.
  2987.  
  2988. - sys.ps1 and sys.ps2 can now arbitrary objects; their str() is
  2989. evaluated for the prompt.
  2990.  
  2991. - The reference manual is brought up to date (more or less -- it still
  2992. needs work, e.g. in the area of package import).
  2993.  
  2994. - The icons used by latex2html are now included in the Doc
  2995. subdirectory (mostly so that tarring up the HTML files can be fully
  2996. automated).  A simple index.html is also added to Doc (it only works
  2997. after you have successfully run latex2html).
  2998.  
  2999. - For all you would-be proselytizers out there: a new version of
  3000. Misc/BLURB describes Python more concisely, and Misc/comparisons
  3001. compares Python to several other languages.  Misc/BLURB.WINDOWS
  3002. contains a blurb specifically aimed at Windows programmers (by Mark
  3003. Hammond).
  3004.  
  3005. - A new version of the Python mode for Emacs is included as
  3006. Misc/python-mode.el.  There are too many new features to list here.
  3007. See http://www.python.org/ftp/emacs/pmdetails.html for more info.
  3008.  
  3009. - New module fileinput makes iterating over the lines of a list of
  3010. files easier.  (This still needs some more thinking to make it more
  3011. extensible.)
  3012.  
  3013. - There's full OS/2 support, courtesy Jeff Rush.  To build the OS/2
  3014. version, see PC/readme.txt and PC/os2vacpp.  This is for IBM's Visual
  3015. Age C++ compiler.  I expect that Jeff will also provide a binary
  3016. release for this platform.
  3017.  
  3018. - On Linux, the configure script now uses '-Xlinker -export-dynamic'
  3019. instead of '-rdynamic' to link the main program so that it exports its
  3020. symbols to shared libraries it loads dynamically.  I hope this doesn't
  3021. break on older Linux versions; it is needed for mklinux and appears to
  3022. work on Linux 2.0.30.
  3023.  
  3024. - Some Tkinter resstructuring: the geometry methods that apply to a
  3025. master are now properly usable on toplevel master widgets.  There's a
  3026. new (internal) widget class, BaseWidget.  New, longer "official" names
  3027. for the geometry manager methods have been added,
  3028. e.g. "grid_columnconfigure()" instead of "columnconfigure()".  The old
  3029. shorter names still work, and where there's ambiguity, pack wins over
  3030. place wins over grid.  Also, the bind_class method now returns its
  3031. value.
  3032.  
  3033. - New, RFC-822 conformant parsing of email addresses and address lists
  3034. in the rfc822 module, courtesy Ben Escoto.
  3035.  
  3036. - New, revamped tkappinit.c with support for popular packages (PIL,
  3037. TIX, BLT, TOGL).  For the last three, you need to execute the Tcl
  3038. command "load {} Tix" (or Blt, or Togl) to gain access to them.
  3039. The Modules/Setup line for the _tkinter module has been rewritten
  3040. using the cool line-breaking feature of most Bourne shells.
  3041.  
  3042. - New socket method connect_ex() returns the error code from connect()
  3043. instead of raising an exception on errors; this makes the logic
  3044. required for asynchronous connects simpler and more efficient.
  3045.  
  3046. - New "locale" module with (still experimental) interface to the
  3047. standard C library locale interface, courtesy Martin von Loewis.  This
  3048. does not repeat my mistake in 1.5a4 of always calling
  3049. setlocale(LC_ALL, "").  In fact, we've pretty much decided that
  3050. Python's standard numerical formatting operations should always use
  3051. the conventions for the C locale; the locale module contains utility
  3052. functions to format numbers according to the user specified locale.
  3053. (All this is accomplished by an explicit call to setlocale(LC_NUMERIC,
  3054. "C") after locale-changing calls.)  See the library manual. (Alas, the
  3055. promised changes to the "re" module for locale support have not been
  3056. materialized yet.  If you care, volunteer!)
  3057.  
  3058. - Memory leak plugged in Py_BuildValue when building a dictionary.
  3059.  
  3060. - Shared modules can now live inside packages (hierarchical module
  3061. namespaces).  No changes to the shared module itself are needed.
  3062.  
  3063. - Improved policy for __builtins__: this is a module in __main__ and a
  3064. dictionary everywhere else.
  3065.  
  3066. - Python no longer catches SIGHUP and SIGTERM by default.  This was
  3067. impossible to get right in the light of thread contexts.  If you want
  3068. your program to clean up when a signal happens, use the signal module
  3069. to set up your own signal handler.
  3070.  
  3071. - New Python/C API PyNumber_CoerceEx() does not return an exception
  3072. when no coercion is possible.  This is used to fix a problem where
  3073. comparing incompatible numbers for equality would raise an exception
  3074. rather than return false as in Python 1.4 -- it once again will return
  3075. false.
  3076.  
  3077. - The errno module is changed again -- the table of error messages
  3078. (errorstr) is removed.  Instead, you can use os.strerror().  This
  3079. removes redundance and a potential locale dependency.
  3080.  
  3081. - New module xmllib, to parse XML files.  By Sjoerd Mullender.
  3082.  
  3083. - New C API PyOS_AfterFork() is called after fork() in posixmodule.c.
  3084. It resets the signal module's notion of what the current process ID
  3085. and thread are, so that signal handlers will work after (and across)
  3086. calls to os.fork().
  3087.  
  3088. - Fixed most occurrences of fatal errors due to missing thread state.
  3089.  
  3090. - For vgrind (a flexible source pretty printer) fans, there's a simple
  3091. Python definition in Misc/vgrindefs, courtesy Neale Pickett.
  3092.  
  3093. - Fixed memory leak in exec statement.
  3094.  
  3095. - The test.pystone module has a new function, pystones(loops=LOOPS),
  3096. which returns a (benchtime, stones) tuple.  The main() function now
  3097. calls this and prints the report.
  3098.  
  3099. - Package directories now *require* the presence of an __init__.py (or
  3100. __init__.pyc) file before they are considered as packages.  This is
  3101. done to prevent accidental subdirectories with common names from
  3102. overriding modules with the same name.
  3103.  
  3104. - Fixed some strange exceptions in __del__ methods in library modules
  3105. (e.g. urllib).  This happens because the builtin names are already
  3106. deleted by the time __del__ is called.  The solution (a hack, but it
  3107. works) is to set some instance variables to 0 instead of None.
  3108.  
  3109. - The table of built-in module initializers is replaced by a pointer
  3110. variable.  This makes it possible to switch to a different table at
  3111. run time, e.g. when a collection of modules is loaded from a shared
  3112. library.  (No example code of how to do this is given, but it is
  3113. possible.)  The table is still there of course, its name prefixed with
  3114. an underscore and used to initialize the pointer.
  3115.  
  3116. - The warning about a thread still having a frame now only happens in
  3117. verbose mode.
  3118.  
  3119. - Change the signal finialization so that it also resets the signal
  3120. handlers.  After this has been called, our signal handlers are no
  3121. longer active!
  3122.  
  3123. - New version of tokenize.py (by Ka-Ping Yee) recognizes raw string
  3124. literals.  There's now also a test fort this module.
  3125.  
  3126. - The copy module now also uses __dict__.update(state) instead of
  3127. going through individual attribute assignments, for class instances
  3128. without a __setstate__ method.
  3129.  
  3130. - New module reconvert translates old-style (regex module) regular
  3131. expressions to new-style (re module, Perl-style) regular expressions.
  3132.  
  3133. - Most modules that used to use the regex module now use the re
  3134. module.  The grep module has a new pgrep() function which uses
  3135. Perl-style regular expressions.
  3136.  
  3137. - The (very old, backwards compatibility) regexp.py module has been
  3138. deleted.
  3139.  
  3140. - Restricted execution (rexec): added the pcre module (support for the
  3141. re module) to the list of trusted extension modules.
  3142.  
  3143. - New version of Jim Fulton's CObject object type, adds
  3144. PyCObject_FromVoidPtrAndDesc() and PyCObject_GetDesc() APIs.
  3145.  
  3146. - Some patches to Lee Busby's fpectl mods that accidentally didn't
  3147. make it into 1.5a4.
  3148.  
  3149. - In the string module, add an optional 4th argument to count(),
  3150. matching find() etc.
  3151.  
  3152. - Patch for the nntplib module by Charles Waldman to add optional user
  3153. and password arguments to NNTP.__init__(), for nntp servers that need
  3154. them.
  3155.  
  3156. - The str() function for class objects now returns
  3157. "modulename.classname" instead of returning the same as repr().
  3158.  
  3159. - The parsing of \xXX escapes no longer relies on sscanf().
  3160.  
  3161. - The "sharedmodules" subdirectory of the installation is renamed to
  3162. "lib-dynload".  (You may have to edit your Modules/Setup file to fix
  3163. this in an existing installation!)
  3164.  
  3165. - Fixed Don Beaudry's mess-up with the OPT test in the configure
  3166. script.  Certain SGI platforms will still issue a warning for each
  3167. compile; there's not much I can do about this since the compiler's
  3168. exit status doesn't indicate that I was using an obsolete option.
  3169.  
  3170. - Fixed Barry's mess-up with {}.get(), and added test cases for it.
  3171.  
  3172. - Shared libraries didn't quite work under AIX because of the change
  3173. in status of the GNU readline interface.  Fix due to by Vladimir
  3174. Marangozov.
  3175.  
  3176.  
  3177. ======================================================================
  3178.  
  3179.  
  3180. From 1.5a3 to 1.5a4
  3181. ===================
  3182.  
  3183. - faqwiz.py: version 0.8; Recognize https:// as URL; <html>...</html>
  3184. feature; better install instructions; removed faqmain.py (which was an
  3185. older version).
  3186.  
  3187. - nntplib.py: Fixed some bugs reported by Lars Wirzenius (to Debian)
  3188. about the treatment of lines starting with '.'.  Added a minimal test
  3189. function.
  3190.  
  3191. - struct module: ignore most whitespace in format strings.
  3192.  
  3193. - urllib.py: close the socket and temp file in URLopener.retrieve() so
  3194. that multiple retrievals using the same connection work.
  3195.  
  3196. - All standard exceptions are now classes by default; use -X to make
  3197. them strings (for backward compatibility only).
  3198.  
  3199. - There's a new standard exception hierarchy, defined in the standard
  3200. library module exceptions.py (which you never need to import
  3201. explicitly).  See
  3202. http://grail.cnri.reston.va.us/python/essays/stdexceptions.html for
  3203. more info.
  3204.  
  3205. - Three new C API functions:
  3206.  
  3207.   - int PyErr_GivenExceptionMatches(obj1, obj2)
  3208.  
  3209.     Returns 1 if obj1 and obj2 are the same object, or if obj1 is an
  3210.     instance of type obj2, or of a class derived from obj2
  3211.  
  3212.   - int PyErr_ExceptionMatches(obj)
  3213.  
  3214.     Higher level wrapper around PyErr_GivenExceptionMatches() which uses
  3215.     PyErr_Occurred() as obj1.  This will be the more commonly called
  3216.     function.
  3217.  
  3218.   - void PyErr_NormalizeException(typeptr, valptr, tbptr)
  3219.  
  3220.     Normalizes exceptions, and places the normalized values in the
  3221.     arguments.  If type is not a class, this does nothing.  If type is a
  3222.     class, then it makes sure that value is an instance of the class by:
  3223.  
  3224.     1. if instance is of the type, or a class derived from type, it does
  3225.        nothing.
  3226.  
  3227.     2. otherwise it instantiates the class, using the value as an
  3228.        argument.  If value is None, it uses an empty arg tuple, and if
  3229.        the value is a tuple, it uses just that.
  3230.  
  3231. - Another new C API function: PyErr_NewException() creates a new
  3232. exception class derived from Exception; when -X is given, it creates a
  3233. new string exception.
  3234.  
  3235. - core interpreter: remove the distinction between tuple and list
  3236. unpacking; allow an arbitrary sequence on the right hand side of any
  3237. unpack instruction.  (UNPACK_LIST and UNPACK_TUPLE now do the same
  3238. thing, which should really be called UNPACK_SEQUENCE.)
  3239.  
  3240. - classes: Allow assignments to an instance's __dict__ or __class__,
  3241. so you can change ivars (including shared ivars -- shock horror) and
  3242. change classes dynamically.  Also make the check on read-only
  3243. attributes of classes less draconic -- only the specials names
  3244. __dict__, __bases__, __name__ and __{get,set,del}attr__ can't be
  3245. assigned.
  3246.  
  3247. - Two new built-in functions: issubclass() and isinstance().  Both
  3248. take classes as their second arguments.  The former takes a class as
  3249. the first argument and returns true iff first is second, or is a
  3250. subclass of second.  The latter takes any object as the first argument
  3251. and returns true iff first is an instance of the second, or any
  3252. subclass of second.
  3253.  
  3254. - configure: Added configuration tests for presence of alarm(),
  3255. pause(), and getpwent().
  3256.  
  3257. - Doc/Makefile: changed latex2html targets.
  3258.  
  3259. - classes: Reverse the search order for the Don Beaudry hook so that
  3260. the first class with an applicable hook wins.  Makes more sense.
  3261.  
  3262. - Changed the checks made in Py_Initialize() and Py_Finalize().  It is
  3263. now legal to call these more than once.  The first call to
  3264. Py_Initialize() initializes, the first call to Py_Finalize()
  3265. finalizes.  There's also a new API, Py_IsInitalized() which checks
  3266. whether we are already initialized (in case you want to leave things
  3267. as they were).
  3268.  
  3269. - Completely disable the declarations for malloc(), realloc() and
  3270. free().  Any 90's C compiler has these in header files, and the tests
  3271. to decide whether to suppress the declarations kept failing on some
  3272. platforms.
  3273.  
  3274. - *Before* (instead of after) signalmodule.o is added, remove both
  3275. intrcheck.o and sigcheck.o.  This should get rid of warnings in ar or
  3276. ld on various systems.
  3277.  
  3278. - Added reop to PC/config.c
  3279.  
  3280. - configure: Decided to use -Aa -D_HPUX_SOURCE on HP-UX platforms.
  3281. Removed outdated HP-UX comments from README.  Added Cray T3E comments.
  3282.  
  3283. - Various renames of statically defined functions that had name
  3284. conflicts on some systems, e.g. strndup (GNU libc), join (Cray),
  3285. roundup (sys/types.h).
  3286.  
  3287. - urllib.py: Interpret three slashes in file: URL as local file (for
  3288. Netscape on Windows/Mac).
  3289.  
  3290. - copy.py: Make sure the objects returned by __getinitargs__() are
  3291. kept alive (in the memo) to avoid a certain kind of nasty crash.  (Not
  3292. easily reproducable because it requires a later call to
  3293. __getinitargs__() to return a tuple that happens to be allocated at
  3294. the same address.)
  3295.  
  3296. - Added definition of AR to toplevel Makefile.  Renamed @buildno temp
  3297. file to buildno1.
  3298.  
  3299. - Moved Include/assert.h to Parser/assert.h, which seems to be the
  3300. only place where it's needed.
  3301.  
  3302. - Tweaked the dictionary lookup code again for some more speed
  3303. (Vladimir Marangozov).
  3304.  
  3305. - NT build: Changed the way python15.lib is included in the other
  3306. projects.  Per Mark Hammond's suggestion, add it to the extra libs in
  3307. Settings instead of to the project's source files.
  3308.  
  3309. - regrtest.py: Change default verbosity so that there are only three
  3310. levels left: -q, default and -v.  In default mode, the name of each
  3311. test is now printed.  -v is the same as the old -vv.  -q is more quiet
  3312. than the old default mode.
  3313.  
  3314. - Removed the old FAQ from the distribution.  You now have to get it
  3315. from the web!
  3316.  
  3317. - Removed the PC/make_nt.in file from the distribution; it is no
  3318. longer needed.
  3319.  
  3320. - Changed the build sequence so that shared modules are built last.
  3321. This fixes things for AIX and doesn't hurt elsewhere.
  3322.  
  3323. - Improved test for GNU MP v1 in mpzmodule.c
  3324.  
  3325. - fileobject.c: ftell() on Linux discards all buffered data; changed
  3326. read() code to use lseek() instead to get the same effect
  3327.  
  3328. - configure.in, configure, importdl.c: NeXT sharedlib fixes
  3329.  
  3330. - tupleobject.c: PyTuple_SetItem asserts refcnt==1
  3331.  
  3332. - resource.c: Different strategy regarding whether to declare
  3333. getrusage() and getpagesize() -- #ifdef doesn't work, Linux has
  3334. conflicting decls in its headers.  Choice: only declare the return
  3335. type, not the argument prototype, and not on Linux.
  3336.  
  3337. - importdl.c, configure*: set sharedlib extensions properly for NeXT
  3338.  
  3339. - configure*, Makefile.in, Modules/Makefile.pre.in: AIX shared libraries
  3340. fixed; moved addition of PURIFY to LINKCC to configure
  3341.  
  3342. - reopmodule.c, regexmodule.c, regexpr.c, zlibmodule.c: needed casts
  3343. added to shup up various compilers.
  3344.  
  3345. - _tkinter.c: removed buggy mac #ifndef
  3346.  
  3347. - Doc: various Mac documentation changes, added docs for 'ic' module
  3348.  
  3349. - PC/make_nt.in: deleted
  3350.  
  3351. - test_time.py, test_strftime.py: tweaks to catch %Z (which may return
  3352. "")
  3353.  
  3354. - test_rotor.py: print b -> print `b`
  3355.  
  3356. - Tkinter.py: (tagOrId) -> (tagOrId,)
  3357.  
  3358. - Tkinter.py: the Tk class now also has a configure() method and
  3359. friends (they have been moved to the Misc class to accomplish this).
  3360.  
  3361. - dict.get(key[, default]) returns dict[key] if it exists, or default
  3362. if it doesn't.  The default defaults to None.  This is quicker for
  3363. some applications than using either has_key() or try:...except
  3364. KeyError:....
  3365.  
  3366. - Tools/webchecker/: some small changes to webchecker.py; added
  3367. websucker.py (a simple web site mirroring script).
  3368.  
  3369. - Dictionary objects now have a get() method (also in UserDict.py).
  3370. dict.get(key, default) returns dict[key] if it exists and default
  3371. otherwise; default defaults to None.
  3372.  
  3373. - Tools/scripts/logmerge.py: print the author, too.
  3374.  
  3375. - Changes to import: support for "import a.b.c" is now built in.  See
  3376. http://grail.cnri.reston.va.us/python/essays/packages.html
  3377. for more info.  Most important deviations from "ni.py": __init__.py is
  3378. executed in the package's namespace instead of as a submodule; and
  3379. there's no support for "__" or "__domain__".  Note that "ni.py" is not
  3380. changed to match this -- it is simply declared obsolete (while at the
  3381. same time, it is documented...:-( ).
  3382. Unfortunately, "ihooks.py" has not been upgraded (but see "knee.py"
  3383. for an example implementation of hierarchical module import written in
  3384. Python).
  3385.  
  3386. - More changes to import: the site.py module is now imported by
  3387. default when Python is initialized; use -S to disable it.  The site.py
  3388. module extends the path with several more directories: site-packages
  3389. inside the lib/python1.5/ directory, site-python in the lib/
  3390. directory, and pathnames mentioned in *.pth files found in either of
  3391. those directories.  See
  3392. http://grail.cnri.reston.va.us/python/essays/packages.html
  3393. for more info.
  3394.  
  3395. - Changes to standard library subdirectory names: those subdirectories
  3396. that are not packages have been renamed with a hypen in their name,
  3397. e.g. lib-tk, lib-stdwin, plat-win, plat-linux2, plat-sunos5, dos-8x3.
  3398. The test suite is now a package -- to run a test, you must now use
  3399. "import test.test_foo".
  3400.  
  3401. - A completely new re.py module is provided (thanks to Andrew
  3402. Kuchling, Tim Peters and Jeffrey Ollie) which uses Philip Hazel's
  3403. "pcre" re compiler and engine.  For a while, the "old" re.py (which
  3404. was new in 1.5a3!) will be kept around as re1.py.  The "old" regex
  3405. module and underlying parser and engine are still present -- while
  3406. regex is now officially obsolete, it will probably take several major
  3407. release cycles before it can be removed.
  3408.  
  3409. - The posix module now has a strerror() function which translates an
  3410. error code to a string.
  3411.  
  3412. - The emacs.py module (which was long obsolete) has been removed.
  3413.  
  3414. - The universal makefile Misc/Makefile.pre.in now features an
  3415. "install" target.  By default, installed shared libraries go into
  3416. $exec_prefix/lib/python$VERSION/site-packages/.
  3417.  
  3418. - The install-sh script is installed with the other configuration
  3419. specific files (in the config/ subdirectory).
  3420.  
  3421. - It turns out whatsound.py and sndhdr.py were identical modules.
  3422. Since there's also an imghdr.py file, I propose to make sndhdr.py the
  3423. official one.  For compatibility, whatsound.py imports * from
  3424. sndhdr.py.
  3425.  
  3426. - Class objects have a new attribute, __module__, giving the name of
  3427. the module in which they were declared.  This is useful for pickle and
  3428. for printing the full name of a class exception.
  3429.  
  3430. - Many extension modules no longer issue a fatal error when their
  3431. initialization fails; the importing code now checks whether an error
  3432. occurred during module initialization, and correctly propagates the
  3433. exception to the import statement.
  3434.  
  3435. - Most extension modules now raise class-based exceptions (except when
  3436. -X is used).
  3437.  
  3438. - Subtle changes to PyEval_{Save,Restore}Thread(): always swap the
  3439. thread state -- just don't manipulate the lock if it isn't there.
  3440.  
  3441. - Fixed a bug in Python/getopt.c that made it do the wrong thing when
  3442. an option was a single '-'.  Thanks to Andrew Kuchling.
  3443.  
  3444. - New module mimetypes.py will guess a MIME type from a filename's
  3445. extension.
  3446.  
  3447. - Windows: the DLL version is now settable via a resource rather than
  3448. being hardcoded.  This can be used for "branding" a binary Python
  3449. distribution.
  3450.  
  3451. - urllib.py is now threadsafe -- it now uses re instead of regex, and
  3452. sys.exc_info() instead of sys.exc_{type,value}.
  3453.  
  3454. - Many other library modules that used to use
  3455. sys.exc_{type,value,traceback} are now more thread-safe by virtue of
  3456. using sys.exc_info().
  3457.  
  3458. - The functions in popen2 have an optional buffer size parameter.
  3459. Also, the command argument can now be either a string (passed to the
  3460. shell) or a list of arguments (passed directly to execv).
  3461.  
  3462. - Alas, the thread support for _tkinter released with 1.5a3 didn't
  3463. work.  It's been rewritten.  The bad news is that it now requires a
  3464. modified version of a file in the standard Tcl distribution, which you
  3465. must compile with a -I option pointing to the standard Tcl source
  3466. tree.  For this reason, the thread support is disabled by default.
  3467.  
  3468. - The errno extension module adds two tables: errorcode maps errno
  3469. numbers to errno names (e.g. EINTR), and errorstr maps them to
  3470. message strings.  (The latter is redundant because the new call
  3471. posix.strerror() now does the same, but alla...)  (Marc-Andre Lemburg)
  3472.  
  3473. - The readline extension module now provides some interfaces to
  3474. internal readline routines that make it possible to write a completer
  3475. in Python.  An example completer, rlcompleter.py, is provided.
  3476.  
  3477.     When completing a simple identifier, it completes keywords,
  3478.     built-ins and globals in __main__; when completing
  3479.     NAME.NAME..., it evaluates (!) the expression up to the last
  3480.     dot and completes its attributes.
  3481.  
  3482.     It's very cool to do "import string" type "string.", hit the
  3483.     completion key (twice), and see the list of names defined by
  3484.     the string module!
  3485.  
  3486.     Tip: to use the tab key as the completion key, call
  3487.  
  3488.         readline.parse_and_bind("tab: complete")
  3489.  
  3490. - The traceback.py module has a new function tb_lineno() by Marc-Andre
  3491. Lemburg which extracts the line number from the linenumber table in
  3492. the code object.  Apparently the traceback object doesn't contains the
  3493. right linenumber when -O is used.  Rather than guessing whether -O is
  3494. on or off, the module itself uses tb_lineno() unconditionally.
  3495.  
  3496. - Fixed Demo/tkinter/matt/canvas-moving-or-creating.py: change bind()
  3497. to tag_bind() so it works again.
  3498.  
  3499. - The pystone script is now a standard library module.  Example use:
  3500. "import test.pystone; test.pystone.main()".
  3501.  
  3502. - The import of the readline module in interactive mode is now also
  3503. attempted when -i is specified.  (Yes, I know, giving in to Marc-Andre
  3504. Lemburg, who asked for this. :-)
  3505.  
  3506. - rfc822.py: Entirely rewritten parseaddr() function by Sjoerd
  3507. Mullender, to be closer to the standard.  This fixes the getaddr()
  3508. method.  Unfortunately, getaddrlist() is as broken as ever, since it
  3509. splits on commas without regard for RFC 822 quoting conventions.
  3510.  
  3511. - pprint.py: correctly emit trailing "," in singleton tuples.
  3512.  
  3513. - _tkinter.c: export names for its type objects, TkappType and
  3514. TkttType.
  3515.  
  3516. - pickle.py: use __module__ when defined; fix a particularly hard to
  3517. reproduce bug that confuses the memo when temporary objects are
  3518. returned by custom pickling interfaces; and a semantic change: when
  3519. unpickling the instance variables of an instance, use
  3520. inst.__dict__.update(value) instead of a for loop with setattr() over
  3521. the value.keys().  This is more consistent (the pickling doesn't use
  3522. getattr() either but pickles inst.__dict__) and avoids problems with
  3523. instances that have a __setattr__ hook.  But it *is* a semantic change
  3524. (because the setattr hook is no longer used).  So beware!
  3525.  
  3526. - config.h is now installed (at last) in
  3527. $exec_prefix/include/python1.5/.  For most sites, this means that it
  3528. is actually in $prefix/include/python1.5/, with all the other Python
  3529. include files, since $prefix and $exec_prefix are the same by
  3530. default.
  3531.  
  3532. - The imp module now supports parts of the functionality to implement
  3533. import of hierarchical module names.  It now supports find_module()
  3534. and load_module() for all types of modules.  Docstrings have been
  3535. added for those functions in the built-in imp module that are still
  3536. relevant (some old interfaces are obsolete).  For a sample
  3537. implementation of hierarchical module import in Python, see the new
  3538. library module knee.py.
  3539.  
  3540. - The % operator on string objects now allows arbitrary nested parens
  3541. in a %(...)X style format.  (Brad Howes)
  3542.  
  3543. - Reverse the order in which Setup and Setup.local are passed to the
  3544. makesetup script.  This allows variable definitions in Setup.local to
  3545. override definitions in Setup.  (But you'll still have to edit Setup
  3546. if you want to disable modules that are enabled by default, or if such
  3547. modules need non-standard options.)
  3548.  
  3549. - Added PyImport_ImportModuleEx(name, globals, locals, fromlist); this
  3550. is like PyImport_ImporModule(name) but receives the globals and locals
  3551. dict and the fromlist arguments as well.  (The name is a char*; the
  3552. others are PyObject*s).
  3553.  
  3554. - The 'p' format in the struct extension module alloded to above is
  3555. new in 1.5a4.
  3556.  
  3557. - The types.py module now uses try-except in a few places to make it
  3558. more likely that it can be imported in restricted mode.  Some type
  3559. names are undefined in that case, e.g. CodeType (inaccessible),
  3560. FileType (not always accessible), and TracebackType and FrameType
  3561. (inaccessible).
  3562.  
  3563. - In urllib.py: added separate administration of temporary files
  3564. created y URLopener.retrieve() so cleanup() can properly remove them.
  3565. The old code removed everything in tempcache which was a bad idea if
  3566. the user had passed a non-temp file into it.  Also, in basejoin(),
  3567. interpret relative paths starting in "../".  This is necessary if the
  3568. server uses symbolic links.
  3569.  
  3570. - The Windows build procedure and project files are now based on
  3571. Microsoft Visual C++ 5.x.  The build now takes place in the PCbuild
  3572. directory.  It is much more robust, and properly builds separate Debug
  3573. and Release versions.  (The installer will be added shortly.)
  3574.  
  3575. - Added casts and changed some return types in regexpr.c to avoid
  3576. compiler warnings or errors on some platforms.
  3577.  
  3578. - The AIX build tools for shared libraries now supports VPATH.  (Donn
  3579. Cave)
  3580.  
  3581. - By default, disable the "portable" multimedia modules audioop,
  3582. imageop, and rgbimg, since they don't work on 64-bit platforms.
  3583.  
  3584. - Fixed a nasty bug in cStringIO.c when code was actually using the
  3585. close() method (the destructors would try to free certain fields a
  3586. second time).
  3587.  
  3588. - For those who think they need it, there's a "user.py" module.  This
  3589. is *not* imported by default, but can be imported to run user-specific
  3590. setup commands, ~/.pythonrc.py.
  3591.  
  3592. - Various speedups suggested by Fredrik Lundh, Marc-Andre Lemburg,
  3593. Vladimir Marangozov, and others.
  3594.  
  3595. - Added os.altsep; this is '/' on DOS/Windows, and None on systems
  3596. with a sane filename syntax.
  3597.  
  3598. - os.py: Write out the dynamic OS choice, to avoid exec statements.
  3599. Adding support for a new OS is now a bit more work, but I bet that
  3600. 'dos' or 'nt' will cover most situations...
  3601.  
  3602. - The obsolete exception AccessError is now really gone.
  3603.  
  3604. - Tools/faqwiz/: New installation instructions show how to maintain
  3605. multiple FAQs.  Removed bootstrap script from end of faqwiz.py module.
  3606. Added instructions to bootstrap script, too.  Version bumped to 0.8.1.
  3607. Added <html>...</html> feature suggested by Skip Montanaro.  Added
  3608. leading text for Roulette, default to 'Hit Reload ...'.  Fix typo in
  3609. default SRCDIR.
  3610.  
  3611. - Documentation for the relatively new modules "keyword" and "symbol"
  3612. has been added (to the end of the section on the parser extension
  3613. module).
  3614.  
  3615. - In module bisect.py, but functions have two optional argument 'lo'
  3616. and 'hi' which allow you to specify a subsequence of the array to
  3617. operate on.
  3618.  
  3619. - In ftplib.py, changed most methods to return their status (even when
  3620. it is always "200 OK") rather than swallowing it.
  3621.  
  3622. - main() now calls setlocale(LC_ALL, ""), if setlocale() and
  3623. <locale.h> are defined.
  3624.  
  3625. - Changes to configure.in, the configure script, and both
  3626. Makefile.pre.in files, to support SGI's SGI_ABI platform selection
  3627. environment variable.
  3628.  
  3629.  
  3630. ======================================================================
  3631.  
  3632.  
  3633. From 1.4 to 1.5a3
  3634. =================
  3635.  
  3636. Security
  3637. --------
  3638.  
  3639. - If you are using the setuid script C wrapper (Misc/setuid-prog.c),
  3640. please use the new version.  The old version has a huge security leak.
  3641.  
  3642. Miscellaneous
  3643. -------------
  3644.  
  3645. - Because of various (small) incompatible changes in the Python
  3646. bytecode interpreter, the magic number for .pyc files has changed
  3647. again.
  3648.  
  3649. - The default module search path is now much saner.  Both on Unix and
  3650. Windows, it is essentially derived from the path to the executable
  3651. (which can be overridden by setting the environment variable
  3652. $PYTHONHOME).  The value of $PYTHONPATH on Windows is now inserted in
  3653. front of the default path, like in Unix (instead of overriding the
  3654. default path).  On Windows, the directory containing the executable is
  3655. added to the end of the path.
  3656.  
  3657. - A new version of python-mode.el for Emacs has been included.  Also,
  3658. a new file ccpy-style.el has been added to configure Emacs cc-mode for
  3659. the preferred style in Python C sources.
  3660.  
  3661. - On Unix, when using sys.argv[0] to insert the script directory in
  3662. front of sys.path, expand a symbolic link.  You can now install a
  3663. program in a private directory and have a symbolic link to it in a
  3664. public bin directory, and it will put the private directory in the
  3665. module search path.  Note that the symlink is expanded in sys.path[0]
  3666. but not in sys.argv[0], so you can still tell the name by which you
  3667. were invoked.
  3668.  
  3669. - It is now recommended to use ``#!/usr/bin/env python'' instead of
  3670. ``#!/usr/local/bin/python'' at the start of executable scripts, except
  3671. for CGI scripts.  It has been determined that the use of /usr/bin/env
  3672. is more portable than that of /usr/local/bin/python -- scripts almost
  3673. never have to be edited when the Python interpreter lives in a
  3674. non-standard place.  Note that this doesn't work for CGI scripts since
  3675. the python executable often doesn't live in the HTTP server's default
  3676. search path.
  3677.  
  3678. - The silly -s command line option and the corresponding
  3679. PYTHONSUPPRESS environment variable (and the Py_SuppressPrint global
  3680. flag in the Python/C API) are gone.
  3681.  
  3682. - Most problems on 64-bit platforms should now be fixed.  Andrew
  3683. Kuchling helped.  Some uncommon extension modules are still not
  3684. clean (image and audio ops?).
  3685.  
  3686. - Fixed a bug where multiple anonymous tuple arguments would be mixed up
  3687. when using the debugger or profiler (reported by Just van Rossum).
  3688. The simplest example is ``def f((a,b),(c,d)): print a,b,c,d''; this
  3689. would print the wrong value when run under the debugger or profiler.
  3690.  
  3691. - The hacks that the dictionary implementation used to speed up
  3692. repeated lookups of the same C string were removed; these were a
  3693. source of subtle problems and don't seem to serve much of a purpose
  3694. any longer.
  3695.  
  3696. - All traces of support for the long dead access statement have been
  3697. removed from the sources.
  3698.  
  3699. - Plugged the two-byte memory leak in the tokenizer when reading an
  3700. interactive EOF.
  3701.  
  3702. - There's a -O option to the interpreter that removes SET_LINENO
  3703. instructions and assert statements (see below); it uses and produces
  3704. .pyo files instead of .pyc files.  The speedup is only a few percent
  3705. in most cases.  The line numbers are still available in the .pyo file,
  3706. as a separate table (which is also available in .pyc files).  However,
  3707. the removal of the SET_LINENO instructions means that the debugger
  3708. (pdb) can't set breakpoints on lines in -O mode.  The traceback module
  3709. contains a function to extract a line number from the code object
  3710. referenced in a traceback object.  In the future it should be possible
  3711. to write external bytecode optimizers that create better optimized
  3712. .pyo files, and there should be more control over optimization;
  3713. consider the -O option a "teaser".  Without -O, the assert statement
  3714. actually generates code that first checks __debug__; if this variable
  3715. is false, the assertion is not checked.  __debug__ is a built-in
  3716. variable whose value is initialized to track the -O flag (it's true
  3717. iff -O is not specified).  With -O, no code is generated for assert
  3718. statements, nor for code of the form ``if __debug__: <something>''.
  3719. Sorry, no further constant folding happens.
  3720.  
  3721.  
  3722. Performance
  3723. -----------
  3724.  
  3725. - It's much faster (almost twice for pystone.py -- see
  3726. Tools/scripts).  See the entry on string interning below.
  3727.  
  3728. - Some speedup by using separate free lists for method objects (both
  3729. the C and the Python variety) and for floating point numbers.
  3730.  
  3731. - Big speedup by allocating frame objects with a single malloc() call.
  3732. The Python/C API for frames is changed (you shouldn't be using this
  3733. anyway).
  3734.  
  3735. - Significant speedup by inlining some common opcodes for common operand 
  3736. types (e.g.  i+i, i-i, and list[i]).  Fredrik Lundh.
  3737.  
  3738. - Small speedup by reordering the method tables of some common
  3739. objects (e.g. list.append is now first).
  3740.  
  3741. - Big optimization to the read() method of file objects.  A read()
  3742. without arguments now attempts to use fstat to allocate a buffer of
  3743. the right size; for pipes and sockets, it will fall back to doubling
  3744. the buffer size.  While that the improvement is real on all systems,
  3745. it is most dramatic on Windows.
  3746.  
  3747.  
  3748. Documentation
  3749. -------------
  3750.  
  3751. - Many new pieces of library documentation were contributed, mostly by
  3752. Andrew Kuchling.  Even cmath is now documented!  There's also a
  3753. chapter of the library manual, "libundoc.tex", which provides a
  3754. listing of all undocumented modules, plus their status (e.g. internal,
  3755. obsolete, or in need of documentation).  Also contributions by Sue
  3756. Williams, Skip Montanaro, and some module authors who succumbed to
  3757. pressure to document their own contributed modules :-).  Note that
  3758. printing the documentation now kills fewer trees -- the margins have
  3759. been reduced.
  3760.  
  3761. - I have started documenting the Python/C API. Unfortunately this project 
  3762. hasn't been completed yet.  It will be complete before the final release of 
  3763. Python 1.5, though.  At the moment, it's better to read the LaTeX source 
  3764. than to attempt to run it through LaTeX and print the resulting dvi file.
  3765.  
  3766. - The posix module (and hence os.py) now has doc strings!  Thanks to Neil 
  3767. Schemenauer.  I received a few other contributions of doc strings.  In most 
  3768. other places, doc strings are still wishful thinking...
  3769.  
  3770.  
  3771. Language changes
  3772. ----------------
  3773.  
  3774. - Private variables with leading double underscore are now a permanent 
  3775. feature of the language.  (These were experimental in release 1.4.  I have 
  3776. favorable experience using them; I can't label them "experimental" 
  3777. forever.)
  3778.  
  3779. - There's new string literal syntax for "raw strings".  Prefixing a string 
  3780. literal with the letter r (or R) disables all escape processing in the 
  3781. string; for example, r'\n' is a two-character string consisting of a 
  3782. backslash followed by the letter n.  This combines with all forms of string 
  3783. quotes; it is actually useful for triple quoted doc strings which might 
  3784. contain references to \n or \t.  An embedded quote prefixed with a 
  3785. backslash does not terminate the string, but the backslash is still 
  3786. included in the string; for example, r'\'' is a two-character string 
  3787. consisting of a backslash and a quote.  (Raw strings are also 
  3788. affectionately known as Robin strings, after their inventor, Robin 
  3789. Friedrich.)
  3790.  
  3791. - There's a simple assert statement, and a new exception
  3792. AssertionError.  For example, ``assert foo > 0'' is equivalent to ``if
  3793. not foo > 0: raise AssertionError''.  Sorry, the text of the asserted
  3794. condition is not available; it would be too complicated to generate
  3795. code for this (since the code is generated from a parse tree).
  3796. However, the text is displayed as part of the traceback!
  3797.  
  3798. - The raise statement has a new feature: when using "raise SomeClass,
  3799. somevalue" where somevalue is not an instance of SomeClass, it
  3800. instantiates SomeClass(somevalue).  In 1.5a4, if somevalue is an
  3801. instance of a *derived* class of SomeClass, the exception class raised
  3802. is set to somevalue.__class__, and SomeClass is ignored after that.
  3803.  
  3804. - Duplicate keyword arguments are now detected at compile time;
  3805. f(a=1,a=2) is now a syntax error.
  3806.  
  3807.  
  3808. Changes to builtin features
  3809. ---------------------------
  3810.  
  3811. - There's a new exception FloatingPointError (used only by Lee Busby's
  3812. patches to catch floating point exceptions, at the moment).
  3813.  
  3814. - The obsolete exception ConflictError (presumably used by the long
  3815. obsolete access statement) has been deleted.
  3816.  
  3817. - There's a new function sys.exc_info() which returns the tuple 
  3818. (sys.exc_type, sys.exc_value, sys.exc_traceback) in a thread-safe way.
  3819.  
  3820. - There's a new variable sys.executable, pointing to the executable file 
  3821. for the Python interpreter.
  3822.  
  3823. - The sort() methods for lists no longer uses the C library qsort(); I
  3824. wrote my own quicksort implementation, with lots of help (in the form
  3825. of a kind of competition) from Tim Peters.  This solves a bug in
  3826. dictionary comparisons on some Solaris versions when Python is built
  3827. with threads, and makes sorting lists even faster.
  3828.  
  3829. - The semantics of comparing two dictionaries have changed, to make
  3830. comparison of unequal dictionaries faster.  A shorter dictionary is
  3831. always considered smaller than a larger dictionary.  For dictionaries
  3832. of the same size, the smallest differing element determines the
  3833. outcome (which yields the same results as before in this case, without
  3834. explicit sorting).  Thanks to Aaron Watters for suggesting something
  3835. like this.
  3836.  
  3837. - The semantics of try-except have changed subtly so that calling a
  3838. function in an exception handler that itself raises and catches an
  3839. exception no longer overwrites the sys.exc_* variables.  This also
  3840. alleviates the problem that objects referenced in a stack frame that
  3841. caught an exception are kept alive until another exception is caught
  3842. -- the sys.exc_* variables are restored to their previous value when
  3843. returning from a function that caught an exception.
  3844.  
  3845. - There's a new "buffer" interface.  Certain objects (e.g. strings and
  3846. arrays) now support the "buffer" protocol.  Buffer objects are acceptable 
  3847. whenever formerly a string was required for a write operation; mutable 
  3848. buffer objects can be the target of a read operation using the call
  3849. f.readinto(buffer).  A cool feature is that regular expression matching now 
  3850. also work on array objects.  Contribution by Jack Jansen.  (Needs 
  3851. documentation.)
  3852.  
  3853. - String interning: dictionary lookups are faster when the lookup
  3854. string object is the same object as the key in the dictionary, not
  3855. just a string with the same value.  This is done by having a pool of
  3856. "interned" strings.  Most names generated by the interpreter are now
  3857. automatically interned, and there's a new built-in function intern(s)
  3858. that returns the interned version of a string.  Interned strings are
  3859. not a different object type, and interning is totally optional, but by
  3860. interning most keys a speedup of about 15% was obtained for the
  3861. pystone benchmark.
  3862.  
  3863. - Dictionary objects have several new methods; clear() and copy() have
  3864. the obvious semantics, while update(d) merges the contents of another
  3865. dictionary d into this one, overriding existing keys.  The dictionary
  3866. implementation file is now called dictobject.c rather than the
  3867. confusing mappingobject.c.
  3868.  
  3869. - The intrinsic function dir() is much smarter; it looks in __dict__,
  3870. __members__ and __methods__.
  3871.  
  3872. - The intrinsic functions int(), long() and float() can now take a
  3873. string argument and then do the same thing as string.atoi(),
  3874. string.atol(), and string.atof().  No second 'base' argument is
  3875. allowed, and complex() does not take a string (nobody cared enough).
  3876.  
  3877. - When a module is deleted, its globals are now deleted in two phases.
  3878. In the first phase, all variables whose name begins with exactly one
  3879. underscore are replaced by None; in the second phase, all variables
  3880. are deleted.  This makes it possible to have global objects whose
  3881. destructors depend on other globals.  The deletion order within each
  3882. phase is still random.
  3883.  
  3884. - It is no longer an error for a function to be called without a
  3885. global variable __builtins__ -- an empty directory will be provided
  3886. by default.
  3887.  
  3888. - Guido's corollary to the "Don Beaudry hook": it is now possible to
  3889. do metaprogramming by using an instance as a base class.  Not for the
  3890. faint of heart; and undocumented as yet, but basically if a base class
  3891. is an instance, its class will be instantiated to create the new
  3892. class.  Jim Fulton will love it -- it also works with instances of his
  3893. "extension classes", since it is triggered by the presence of a
  3894. __class__ attribute on the purported base class.  See
  3895. Demo/metaclasses/index.html for an explanation and see that directory
  3896. for examples.
  3897.  
  3898. - Another change is that the Don Beaudry hook is now invoked when
  3899. *any* base class is special.  (Up to 1.5a3, the *last* special base
  3900. class is used; in 1.5a4, the more rational choice of the *first*
  3901. special base class is used.)
  3902.  
  3903. - New optional parameter to the readlines() method of file objects.
  3904. This indicates the number of bytes to read (the actual number of bytes
  3905. read will be somewhat larger due to buffering reading until the end of
  3906. the line).  Some optimizations have also been made to speed it up (but
  3907. not as much as read()).
  3908.  
  3909. - Complex numbers no longer have the ".conj" pseudo attribute; use
  3910. z.conjugate() instead, or complex(z.real, -z.imag).  Complex numbers
  3911. now *do* support the __members__ and __methods__ special attributes.
  3912.  
  3913. - The complex() function now looks for a __complex__() method on class
  3914. instances before giving up.
  3915.  
  3916. - Long integers now support arbitrary shift counts, so you can now
  3917. write 1L<<1000000, memory permitting.  (Python 1.4 reports "outrageous
  3918. shift count for this.)
  3919.  
  3920. - The hex() and oct() functions have been changed so that for regular
  3921. integers, they never emit a minus sign.  For example, on a 32-bit
  3922. machine, oct(-1) now returns '037777777777' and hex(-1) returns
  3923. '0xffffffff'.  While this may seem inconsistent, it is much more
  3924. useful.  (For long integers, a minus sign is used as before, to fit
  3925. the result in memory :-)
  3926.  
  3927. - The hash() function computes better hashes for several data types,
  3928. including strings, floating point numbers, and complex numbers.
  3929.  
  3930.  
  3931. New extension modules
  3932. ---------------------
  3933.  
  3934. - New extension modules cStringIO.c and cPickle.c, written by Jim
  3935. Fulton and other folks at Digital Creations.  These are much more
  3936. efficient than their Python counterparts StringIO.py and pickle.py,
  3937. but don't support subclassing.  cPickle.c clocks up to 1000 times
  3938. faster than pickle.py; cStringIO.c's improvement is less dramatic but
  3939. still significant.
  3940.  
  3941. - New extension module zlibmodule.c, interfacing to the free zlib
  3942. library (gzip compatible compression).  There's also a module gzip.py
  3943. which provides a higher level interface.  Written by Andrew Kuchling
  3944. and Jeremy Hylton.
  3945.  
  3946. - New module readline; see the "miscellaneous" section above.
  3947.  
  3948. - New Unix extension module resource.c, by Jeremy Hylton, provides
  3949. access to getrlimit(), getrusage(), setrusage(), getpagesize(), and
  3950. related symbolic constants.
  3951.  
  3952. - New extension puremodule.c, by Barry Warsaw, which interfaces to the
  3953. Purify(TM) C API.  See also the file Misc/PURIFY.README.  It is also
  3954. possible to enable Purify by simply setting the PURIFY Makefile
  3955. variable in the Modules/Setup file.
  3956.  
  3957.  
  3958. Changes in extension modules
  3959. ----------------------------
  3960.  
  3961. - The struct extension module has several new features to control byte
  3962. order and word size.  It supports reading and writing IEEE floats even
  3963. on platforms where this is not the native format.  It uses uppercase
  3964. format codes for unsigned integers of various sizes (always using
  3965. Python long ints for 'I' and 'L'), 's' with a size prefix for strings,
  3966. and 'p' for "Pascal strings" (with a leading length byte, included in
  3967. the size; blame Hannu Krosing; new in 1.5a4).  A prefix '>' forces
  3968. big-endian data and '<' forces little-endian data; these also select
  3969. standard data sizes and disable automatic alignment (use pad bytes as
  3970. needed).
  3971.  
  3972. - The array module supports uppercase format codes for unsigned data
  3973. formats (like the struct module).
  3974.  
  3975. - The fcntl extension module now exports the needed symbolic
  3976. constants.  (Formerly these were in FCNTL.py which was not available
  3977. or correct for all platforms.)
  3978.  
  3979. - The extension modules dbm, gdbm and bsddb now check that the
  3980. database is still open before making any new calls.
  3981.  
  3982. - The dbhash module is no more.  Use bsddb instead.  (There's a third
  3983. party interface for the BSD 2.x code somewhere on the web; support for
  3984. bsddb will be deprecated.)
  3985.  
  3986. - The gdbm module now supports a sync() method.
  3987.  
  3988. - The socket module now has some new functions: getprotobyname(), and
  3989. the set {ntoh,hton}{s,l}().
  3990.  
  3991. - Various modules now export their type object: socket.SocketType,
  3992. array.ArrayType.
  3993.  
  3994. - The socket module's accept() method now returns unknown addresses as
  3995. a tuple rather than raising an exception.  (This can happen in
  3996. promiscuous mode.)  Theres' also a new function getprotobyname().
  3997.  
  3998. - The pthread support for the thread module now works on most platforms.
  3999.  
  4000. - STDWIN is now officially obsolete.  Support for it will eventually
  4001. be removed from the distribution.
  4002.  
  4003. - The binascii extension module is now hopefully fully debugged.
  4004. (XXX Oops -- Fredrik Lundh promised me a uuencode fix that I never
  4005. received.)
  4006.  
  4007. - audioop.c: added a ratecv() function; better handling of overflow in
  4008. add().
  4009.  
  4010. - posixmodule.c: now exports the O_* flags (O_APPEND etc.).  On
  4011. Windows, also O_TEXT and O_BINARY.  The 'error' variable (the
  4012. exception is raises) is renamed -- its string value is now "os.error",
  4013. so newbies don't believe they have to import posix (or nt) to catch
  4014. it when they see os.error reported as posix.error.  The execve()
  4015. function now accepts any mapping object for the environment.
  4016.  
  4017. - A new version of the al (audio library) module for SGI was
  4018. contributed by Sjoerd Mullender.
  4019.  
  4020. - The regex module has a new function get_syntax() which retrieves the
  4021. syntax setting set by set_syntax().  The code was also sanitized,
  4022. removing worries about unclean error handling.  See also below for its
  4023. successor, re.py.
  4024.  
  4025. - The "new" module (which creates new objects of various types) once
  4026. again has a fully functioning new.function() method.  Dangerous as
  4027. ever!  Also, new.code() has several new arguments.
  4028.  
  4029. - A problem has been fixed in the rotor module: on systems with signed
  4030. characters, rotor-encoded data was not portable when the key contained
  4031. 8-bit characters.  Also, setkey() now requires its argument rather
  4032. than having broken code to default it.
  4033.  
  4034. - The sys.builtin_module_names variable is now a tuple.  Another new
  4035. variables in sys is sys.executable (the full path to the Python
  4036. binary, if known).
  4037.  
  4038. - The specs for time.strftime() have undergone some revisions.  It
  4039. appears that not all format characters are supported in the same way
  4040. on all platforms.  Rather than reimplement it, we note these
  4041. differences in the documentation, and emphasize the shared set of
  4042. features.  There's also a thorough test set (that occasionally finds
  4043. problems in the C library implementation, e.g. on some Linuxes),
  4044. thanks to Skip Montanaro.
  4045.  
  4046. - The nis module seems broken when used with NIS+; unfortunately
  4047. nobody knows how to fix it.  It should still work with old NIS.
  4048.  
  4049.  
  4050. New library modules
  4051. -------------------
  4052.  
  4053. - New (still experimental) Perl-style regular expression module,
  4054. re.py, which uses a new interface for matching as well as a new
  4055. syntax; the new interface avoids the thread-unsafety of the regex
  4056. interface.  This comes with a helper extension reopmodule.c and vastly
  4057. rewritten regexpr.c.  Most work on this was done by Jeffrey Ollie, Tim
  4058. Peters, and Andrew Kuchling.  See the documentation libre.tex.  In
  4059. 1.5, the old regex module is still fully supported; in the future, it
  4060. will become obsolete.
  4061.  
  4062. - New module gzip.py; see zlib above.
  4063.  
  4064. - New module keyword.py exports knowledge about Python's built-in
  4065. keywords.  (New version by Ka-Ping Yee.)
  4066.  
  4067. - New module pprint.py (with documentation) which supports
  4068. pretty-printing of lists, tuples, & dictionaries recursively.  By Fred
  4069. Drake.
  4070.  
  4071. - New module code.py.  The function code.compile_command() can
  4072. determine whether an interactively entered command is complete or not,
  4073. distinguishing incomplete from invalid input.  (XXX Unfortunately,
  4074. this seems broken at this moment, and I don't have the time to fix
  4075. it.  It's probably better to add an explicit interface to the parser
  4076. for this.)
  4077.  
  4078. - There is now a library module xdrlib.py which can read and write the
  4079. XDR data format as used by Sun RPC, for example.  It uses the struct
  4080. module.
  4081.  
  4082.  
  4083. Changes in library modules
  4084. --------------------------
  4085.  
  4086. - Module codehack.py is now completely obsolete.
  4087.  
  4088. - The pickle.py module has been updated to make it compatible with the
  4089. new binary format that cPickle.c produces.  By default it produces the
  4090. old all-ASCII format compatible with the old pickle.py, still much
  4091. faster than pickle.py; it will read both formats automatically.  A few
  4092. other updates have been made.
  4093.  
  4094. - A new helper module, copy_reg.py, is provided to register extensions
  4095. to the pickling code.
  4096.  
  4097. - Revamped module tokenize.py is much more accurate and has an
  4098. interface that makes it a breeze to write code to colorize Python
  4099. source code.  Contributed by Ka-Ping Yee.
  4100.  
  4101. - In ihooks.py, ModuleLoader.load_module() now closes the file under
  4102. all circumstances.
  4103.  
  4104. - The tempfile.py module has a new class, TemporaryFile, which creates
  4105. an open temporary file that will be deleted automatically when
  4106. closed.  This works on Windows and MacOS as well as on Unix.  (Jim
  4107. Fulton.)
  4108.  
  4109. - Changes to the cgi.py module: Most imports are now done at the
  4110. top of the module, which provides a speedup when using ni (Jim
  4111. Fulton).  The problem with file upload to a Windows platform is solved
  4112. by using the new tempfile.TemporaryFile class; temporary files are now
  4113. always opened in binary mode (Jim Fulton).  The cgi.escape() function
  4114. now takes an optional flag argument that quotes '"' to '"'.  It
  4115. is now possible to invoke cgi.py from a command line script, to test
  4116. cgi scripts more easily outside an http server.  There's an optional
  4117. limit to the size of uploads to POST (Skip Montanaro).  Added a
  4118. 'strict_parsing' option to all parsing functions (Jim Fulton).  The
  4119. function parse_qs() now uses urllib.unquote() on the name as well as
  4120. the value of fields (Clarence Gardner).  The FieldStorage class now
  4121. has a __len__() method.
  4122.  
  4123. - httplib.py: the socket object is no longer closed; all HTTP/1.*
  4124. responses are now accepted; and it is now thread-safe (by not using
  4125. the regex module).
  4126.  
  4127. - BaseHTTPModule.py: treat all HTTP/1.* versions the same.
  4128.  
  4129. - The popen2.py module is now rewritten using a class, which makes
  4130. access to the standard error stream and the process id of the
  4131. subprocess possible.
  4132.  
  4133. - Added timezone support to the rfc822.py module, in the form of a
  4134. getdate_tz() method and a parsedate_tz() function; also a mktime_tz().
  4135. Also added recognition of some non-standard date formats, by Lars
  4136. Wirzenius, and RFC 850 dates (Chris Lawrence).
  4137.  
  4138. - mhlib.py: various enhancements, including almost compatible parsing
  4139. of message sequence specifiers without invoking a subprocess.  Also
  4140. added a createmessage() method by Lars Wirzenius.
  4141.  
  4142. - The StringIO.StringIO class now supports readline(nbytes).  (Lars 
  4143. Wirzenius.)  (Of course, you should be using cStringIO for performance.)
  4144.  
  4145. - UserDict.py supports the new dictionary methods as well.
  4146.  
  4147. - Improvements for whrandom.py by Tim Peters: use 32-bit arithmetic to
  4148. speed it up, and replace 0 seed values by 1 to avoid degeneration.
  4149. A bug was fixed in the test for invalid arguments.
  4150.  
  4151. - Module ftplib.py: added support for parsing a .netrc file (Fred
  4152. Drake).  Also added an ntransfercmd() method to the FTP class, which
  4153. allows access to the expected size of a transfer when available, and a
  4154. parse150() function to the module which parses the corresponding 150
  4155. response.
  4156.  
  4157. - urllib.py: the ftp cache is now limited to 10 entries.  Added
  4158. quote_plus() and unquote_plus() functions which are like quote() and
  4159. unquote() but also replace spaces with '+' or vice versa, for
  4160. encoding/decoding CGI form arguments.  Catch all errors from the ftp
  4161. module.  HTTP requests now add the Host: header line.  The proxy
  4162. variable names are now mapped to lower case, for Windows.  The
  4163. spliturl() function no longer erroneously throws away all data past
  4164. the first newline.  The basejoin() function now intereprets "../"
  4165. correctly.  I *believe* that the problems with "exception raised in
  4166. __del__" under certain circumstances have been fixed (mostly by
  4167. changes elsewher in the interpreter).
  4168.  
  4169. - In urlparse.py, there is a cache for results in urlparse.urlparse();
  4170. its size limit is set to 20.  Also, new URL schemes shttp, https, and
  4171. snews are "supported".
  4172.  
  4173. - shelve.py: use cPickle and cStringIO when available.  Also added
  4174. a sync() method, which calls the database's sync() method if there is
  4175. one.
  4176.  
  4177. - The mimetools.py module now uses the available Python modules for
  4178. decoding quoted-printable, uuencode and base64 formats, rather than
  4179. creating a subprocess.
  4180.  
  4181. - The python debugger (pdb.py, and its base class bdb.py) now support
  4182. conditional breakpoints.  See the docs.
  4183.  
  4184. - The modules base64.py, uu.py and quopri.py can now be used as simple
  4185. command line utilities.
  4186.  
  4187. - Various small fixes to the nntplib.py module that I can't bother to
  4188. document in detail.
  4189.  
  4190. - Sjoerd Mullender's mimify.py module now supports base64 encoding and 
  4191. includes functions to handle the funny encoding you sometimes see in mail 
  4192. headers.  It is now documented.
  4193.  
  4194. - mailbox.py: Added BabylMailbox.  Improved the way the mailbox is
  4195. gotten from the environment.
  4196.  
  4197. - Many more modules now correctly open files in binary mode when this
  4198. is necessary on non-Unix platforms.
  4199.  
  4200. - The copying functions in the undocumented module shutil.py are
  4201. smarter.
  4202.  
  4203. - The Writer classes in the formatter.py module now have a flush()
  4204. method.
  4205.  
  4206. - The sgmllib.py module accepts hyphens and periods in the middle of
  4207. attribute names.  While this is against the SGML standard, there is
  4208. some HTML out there that uses this...
  4209.  
  4210. - The interface for the Python bytecode disassembler module, dis.py,
  4211. has been enhanced quite a bit.  There's now one main function,
  4212. dis.dis(), which takes almost any kind of object (function, module,
  4213. class, instance, method, code object) and disassembles it; without
  4214. arguments it disassembles the last frame of the last traceback.  The
  4215. other functions have changed slightly, too.
  4216.  
  4217. - The imghdr.py module recognizes new image types: BMP, PNG.
  4218.  
  4219. - The string.py module has a new function replace(str, old, new,
  4220. [maxsplit]) which does substring replacements.  It is actually
  4221. implemented in C in the strop module.  The functions [r]find() an
  4222. [r]index() have an optional 4th argument indicating the end of the
  4223. substring to search, alsoo implemented by their strop counterparts.
  4224. (Remember, never import strop -- import string uses strop when
  4225. available with zero overhead.)
  4226.  
  4227. - The string.join() function now accepts any sequence argument, not
  4228. just lists and tuples.
  4229.  
  4230. - The string.maketrans() requires its first two arguments to be
  4231. present.  The old version didn't require them, but there's not much
  4232. point without them, and the documentation suggests that they are
  4233. required, so we fixed the code to match the documentation.
  4234.  
  4235. - The regsub.py module has a function clear_cache(), which clears its
  4236. internal cache of compiled regular expressions.  Also, the cache now
  4237. takes the current syntax setting into account.  (However, this module
  4238. is now obsolete -- use the sub() or subn() functions or methods in the
  4239. re module.)
  4240.  
  4241. - The undocumented module Complex.py has been removed, now that Python
  4242. has built-in complex numbers.  A similar module remains as
  4243. Demo/classes/Complex.py, as an example.
  4244.  
  4245.  
  4246. Changes to the build process
  4247. ----------------------------
  4248.  
  4249. - The way GNU readline is configured is totally different.  The
  4250. --with-readline configure option is gone.  It is now an extension
  4251. module, which may be loaded dynamically.  You must enable it (and
  4252. specify the correct linraries to link with) in the Modules/Setup file.
  4253. Importing the module installs some hooks which enable command line
  4254. editing.  When the interpreter shell is invoked interactively, it
  4255. attempts to import the readline module; when this fails, the default
  4256. input mechanism is used.  The hook variables are PyOS_InputHook and
  4257. PyOS_ReadlineFunctionPointer.  (Code contributed by Lee Busby, with
  4258. ideas from William Magro.)
  4259.  
  4260. - New build procedure: a single library, libpython1.5.a, is now built,
  4261. which contains absolutely everything except for a one-line main()
  4262. program (which calls Py_Main(argc, argv) to start the interpreter
  4263. shell).  This makes life much simpler for applications that need to
  4264. embed Python.  The serial number of the build is now included in the
  4265. version string (sys.version).
  4266.  
  4267. - As far as I can tell, neither gcc -Wall nor the Microsoft compiler
  4268. emits a single warning any more when compiling Python.
  4269.  
  4270. - A number of new Makefile variables have been added for special
  4271. situations, e.g. LDLAST is appended to the link command.  These are
  4272. used by editing the Makefile or passing them on the make command
  4273. line.
  4274.  
  4275. - A set of patches from Lee Busby has been integrated that make it
  4276. possible to catch floating point exceptions.  Use the configure option
  4277. --with-fpectl to enable the patches; the extension modules fpectl and
  4278. fpetest provide control to enable/disable and test the feature,
  4279. respectively.
  4280.  
  4281. - The support for shared libraries under AIX is now simpler and more
  4282. robust.  Thanks to Vladimir Marangozov for revamping his own patches!
  4283.  
  4284. - The Modules/makesetup script now reads a file Setup.local as well as
  4285. a file Setup.  Most changes to the Setup script can be done by editing
  4286. Setup.local instead, which makes it easier to carry a particular setup
  4287. over from one release to the next.
  4288.  
  4289. - The Modules/makesetup script now copies any "include" lines it
  4290. encounters verbatim into the output Makefile.  It also recognizes .cxx
  4291. and .cpp as C++ source files.
  4292.  
  4293. - The configure script is smarter about C compiler options; e.g. with
  4294. gcc it uses -O2 and -g when possible, and on some other platforms it
  4295. uses -Olimit 1500 to avoid a warning from the optimizer about the main
  4296. loop in ceval.c (which has more than 1000 basic blocks).
  4297.  
  4298. - The configure script now detects whether malloc(0) returns a NULL
  4299. pointer or a valid block (of length zero).  This avoids the nonsense
  4300. of always adding one byte to all malloc() arguments on most platforms.
  4301.  
  4302. - The configure script has a new option, --with-dec-threads, to enable
  4303. DEC threads on DEC Alpha platforms.  Also, --with-threads is now an
  4304. alias for --with-thread (this was the Most Common Typo in configure
  4305. arguments).
  4306.  
  4307. - Many changes in Doc/Makefile; amongst others, latex2html is now used
  4308. to generate HTML from all latex documents.
  4309.  
  4310.  
  4311. Change to the Python/C API
  4312. --------------------------
  4313.  
  4314. - Because some interfaces have changed, the PYTHON_API macro has been
  4315. bumped.  Most extensions built for the old API version will still run,
  4316. but I can't guarantee this.  Python prints a warning message on
  4317. version mismatches; it dumps core when the version mismatch causes a
  4318. serious problem :-)
  4319.  
  4320. - I've completed the Grand Renaming, with the help of Roger Masse and
  4321. Barry Warsaw.  This makes reading or debugging the code much easier.
  4322. Many other unrelated code reorganizations have also been carried out.
  4323. The allobjects.h header file is gone; instead, you would have to
  4324. include Python.h followed by rename2.h.  But you're better off running
  4325. Tools/scripts/fixcid.py -s Misc/RENAME on your source, so you can omit
  4326. the rename2.h; it will disappear in the next release.
  4327.  
  4328. - Various and sundry small bugs in the "abstract" interfaces have been
  4329. fixed.  Thanks to all the (involuntary) testers of the Python 1.4
  4330. version!  Some new functions have been added, e.g. PySequence_List(o),
  4331. equivalent to list(o) in Python.
  4332.  
  4333. - New API functions PyLong_FromUnsignedLong() and
  4334. PyLong_AsUnsignedLong().
  4335.  
  4336. - The API functions in the file cgensupport.c are no longer
  4337. supported.  This file has been moved to Modules and is only ever
  4338. compiled when the SGI specific 'gl' module is built.
  4339.  
  4340. - PyObject_Compare() can now raise an exception.  Check with
  4341. PyErr_Occurred().  The comparison function in an object type may also
  4342. raise an exception.
  4343.  
  4344. - The slice interface uses an upper bound of INT_MAX when no explicit
  4345. upper bound is given (e.x. for a[1:]).  It used to ask the object for
  4346. its length and do the calculations.
  4347.  
  4348. - Support for multiple independent interpreters.  See Doc/api.tex,
  4349. functions Py_NewInterpreter() and Py_EndInterpreter().  Since the
  4350. documentation is incomplete, also see the new Demo/pysvr example
  4351. (which shows how to use these in a threaded application) and the
  4352. source code.
  4353.  
  4354. - There is now a Py_Finalize() function which "de-initializes"
  4355. Python.  It is possible to completely restart the interpreter
  4356. repeatedly by calling Py_Finalize() followed by Py_Initialize().  A
  4357. change of functionality in Py_Initialize() means that it is now a
  4358. fatal error to call it while the interpreter is already initialized.
  4359. The old, half-hearted Py_Cleanup() routine is gone.  Use of Py_Exit()
  4360. is deprecated (it is nothing more than Py_Finalize() followed by
  4361. exit()).
  4362.  
  4363. - There are no known memory leaks left.  While Py_Finalize() doesn't
  4364. free *all* allocated memory (some of it is hard to track down),
  4365. repeated calls to Py_Finalize() and Py_Initialize() do not create
  4366. unaccessible heap blocks.
  4367.  
  4368. - There is now explicit per-thread state.  (Inspired by, but not the
  4369. same as, Greg Stein's free threading patches.)
  4370.  
  4371. - There is now better support for threading C applications.  There are
  4372. now explicit APIs to manipulate the interpreter lock.  Read the source
  4373. or the Demo/pysvr example; the new functions are
  4374. PyEval_{Acquire,Release}{Lock,Thread}().
  4375.  
  4376. - The test macro DEBUG has changed to Py_DEBUG, to avoid interference
  4377. with other libraries' DEBUG macros.  Likewise for any other test
  4378. macros that didn't yet start with Py_.
  4379.  
  4380. - New wrappers around malloc() and friends: Py_Malloc() etc. call
  4381. malloc() and call PyErr_NoMemory() when it fails; PyMem_Malloc() call
  4382. just malloc().  Use of these wrappers could be essential if multiple
  4383. memory allocators exist (e.g. when using certain DLL setups under
  4384. Windows).  (Idea by Jim Fulton.)
  4385.  
  4386. - New C API PyImport_Import() which uses whatever __import__() hook
  4387. that is installed for the current execution environment.  By Jim
  4388. Fulton.
  4389.  
  4390. - It is now possible for an extension module's init function to fail
  4391. non-fatally, by calling one of the PyErr_* functions and returning.
  4392.  
  4393. - The PyInt_AS_LONG() and PyFloat_AS_DOUBLE() macros now cast their
  4394. argument to the proper type, like the similar PyString macros already
  4395. did.  (Suggestion by Marc-Andre Lemburg.)  Similar for PyList_GET_SIZE
  4396. and PyList_GET_ITEM.
  4397.  
  4398. - Some of the Py_Get* function, like Py_GetVersion() (but not yet
  4399. Py_GetPath()) are now declared as returning a const char *.  (More
  4400. should follow.)
  4401.  
  4402. - Changed the run-time library to check for exceptions after object
  4403. comparisons.  PyObject_Compare() can now return an exception; use
  4404. PyErr_Occurred() to check (there is *no* special return value).
  4405.  
  4406. - PyFile_WriteString() and Py_Flushline() now return error indicators
  4407. instead of clearing exceptions.  This fixes an obscure bug where using
  4408. these would clear a pending exception, discovered by Just van Rossum.
  4409.  
  4410. - There's a new function, PyArg_ParseTupleAndKeywords(), which parses
  4411. an argument list including keyword arguments.  Contributed by Geoff
  4412. Philbrick.
  4413.  
  4414. - PyArg_GetInt() is gone.
  4415.  
  4416. - It's no longer necessary to include graminit.h when calling one of
  4417. the extended parser API functions.  The three public grammar start
  4418. symbols are now in Python.h as Py_single_input, Py_file_input, and
  4419. Py_eval_input.
  4420.  
  4421. - The CObject interface has a new function,
  4422. PyCObject_Import(module, name).  It calls PyCObject_AsVoidPtr()
  4423. on the object referenced by "module.name".
  4424.  
  4425.  
  4426. Tkinter
  4427. -------
  4428.  
  4429. - On popular demand, _tkinter once again installs a hook for readline
  4430. that processes certain Tk events while waiting for the user to type
  4431. (using PyOS_InputHook).
  4432.  
  4433. - A patch by Craig McPheeters plugs the most obnoxious memory leaks,
  4434. caused by command definitions referencing widget objects beyond their
  4435. lifetime.
  4436.  
  4437. - New standard dialog modules: tkColorChooser.py, tkCommonDialog.py,
  4438. tkMessageBox.py, tkFileDialog.py, tkSimpleDialog.py These interface
  4439. with the new Tk dialog scripts, and provide more "native platform"
  4440. style file selection dialog boxes on some platforms.  Contributed by
  4441. Fredrik Lundh.
  4442.  
  4443. - Tkinter.py: when the first Tk object is destroyed, it sets the
  4444. hiddel global _default_root to None, so that when another Tk object is
  4445. created it becomes the new default root.  Other miscellaneous
  4446. changes and fixes.
  4447.  
  4448. - The Image class now has a configure method.
  4449.  
  4450. - Added a bunch of new winfo options to Tkinter.py; we should now be
  4451. up to date with Tk 4.2.  The new winfo options supported are:
  4452. mananger, pointerx, pointerxy, pointery, server, viewable, visualid,
  4453. visualsavailable.
  4454.  
  4455. - The broken bind() method on Canvas objects defined in the Canvas.py
  4456. module has been fixed.  The CanvasItem and Group classes now also have
  4457. an unbind() method.
  4458.  
  4459. - The problem with Tkinter.py falling back to trying to import
  4460. "tkinter" when "_tkinter" is not found has been fixed -- it no longer
  4461. tries "tkinter", ever.  This makes diagnosing the problem "_tkinter
  4462. not configured" much easier and will hopefully reduce the newsgroup
  4463. traffic on this topic.
  4464.  
  4465. - The ScrolledText module once again supports the 'cnf' parameter, to
  4466. be compatible with the examples in Mark Lutz' book (I know, I know,
  4467. too late...)
  4468.  
  4469. - The _tkinter.c extension module has been revamped.  It now support
  4470. Tk versions 4.1 through 8.0; support for 4.0 has been dropped.  It
  4471. works well under Windows and Mac (with the latest Tk ports to those
  4472. platforms).  It also supports threading -- it is safe for one
  4473. (Python-created) thread to be blocked in _tkinter.mainloop() while
  4474. other threads modify widgets.  To make the changes visible, those
  4475. threads must use update_idletasks()method.  (The patch for threading
  4476. in 1.5a3 was broken; in 1.5a4, it is back in a different version,
  4477. which requires access to the Tcl sources to get it to work -- hence it
  4478. is disabled by default.)
  4479.  
  4480. - A bug in _tkinter.c has been fixed, where Split() with a string
  4481. containing an unmatched '"' could cause an exception or core dump.
  4482.  
  4483. - Unfortunately, on Windows and Mac, Tk 8.0 no longer supports
  4484. CreateFileHandler, so _tkinter.createfilehandler is not available on
  4485. those platforms when using Tk 8.0 or later.  I will have to rethink
  4486. how to interface with Tcl's lower-level event mechanism, or with its
  4487. channels (which are like Python's file-like objects).  Jack Jansen has
  4488. provided a fix for the Mac, so createfilehandler *is* actually
  4489. supported there; maybe I can adapt his fix for Windows.
  4490.  
  4491.  
  4492. Tools and Demos
  4493. ---------------
  4494.  
  4495. - A new regression test suite is provided, which tests most of the
  4496. standard and built-in modules.  The regression test is run by invoking
  4497. the script Lib/test/regrtest.py.  Barry Warsaw wrote the test harnass;
  4498. he and Roger Masse contributed most of the new tests.
  4499.  
  4500. - New tool: faqwiz -- the CGI script that is used to maintain the
  4501. Python FAQ (http://grail.cnri.reston.va.us/cgi-bin/faqw.py).  In
  4502. Tools/faqwiz.
  4503.  
  4504. - New tool: webchecker -- a simple extensible web robot that, when
  4505. aimed at a web server, checks that server for dead links.  Available
  4506. are a command line utility as well as a Tkinter based GUI version.  In
  4507. Tools/webchecker.  A simplified version of this program is dissected
  4508. in my article in O'Reilly's WWW Journal, the issue on Scripting
  4509. Languages (Vol 2, No 2); Scripting the Web with Python (pp 97-120).
  4510. Includes a parser for robots.txt files by Skip Montanaro.
  4511.  
  4512. - New small tools: cvsfiles.py (prints a list of all files under CVS
  4513. n a particular directory tree), treesync.py (a rather Guido-specific
  4514. script to synchronize two source trees, one on Windows NT, the other
  4515. one on Unix under CVS but accessible from the NT box), and logmerge.py
  4516. (sort a collection of RCS or CVS logs by date).  In Tools/scripts.
  4517.  
  4518. - The freeze script now also works under Windows (NT).  Another
  4519. feature allows the -p option to be pointed at the Python source tree
  4520. instead of the installation prefix.  This was loosely based on part of
  4521. xfreeze by Sam Rushing and Bill Tutt.
  4522.  
  4523. - New examples (Demo/extend) that show how to use the generic
  4524. extension makefile (Misc/Makefile.pre.in).
  4525.  
  4526. - Tools/scripts/h2py.py now supports C++ comments.
  4527.  
  4528. - Tools/scripts/pystone.py script is upgraded to version 1.1; there
  4529. was a bug in version 1.0 (distributed with Python 1.4) that leaked
  4530. memory.  Also, in 1.1, the LOOPS variable is incremented to 10000.
  4531.  
  4532. - Demo/classes/Rat.py completely rewritten by Sjoerd Mullender.
  4533.  
  4534.  
  4535. Windows (NT and 95)
  4536. -------------------
  4537.  
  4538. - New project files for Developer Studio (Visual C++) 5.0 for Windows
  4539. NT (the old VC++ 4.2 Makefile is also still supported, but will
  4540. eventually be withdrawn due to its bulkiness).
  4541.  
  4542. - See the note on the new module search path in the "Miscellaneous" section 
  4543. above.
  4544.  
  4545. - Support for Win32s (the 32-bit Windows API under Windows 3.1) is
  4546. basically withdrawn.  If it still works for you, you're lucky.
  4547.  
  4548. - There's a new extension module, msvcrt.c, which provides various 
  4549. low-level operations defined in the Microsoft Visual C++ Runtime Library.  
  4550. These include locking(), setmode(), get_osfhandle(), set_osfhandle(), and 
  4551. console I/O functions like kbhit(), getch() and putch().
  4552.  
  4553. - The -u option not only sets the standard I/O streams to unbuffered
  4554. status, but also sets them in binary mode.  (This can also be done
  4555. using msvcrt.setmode(), by the way.)
  4556.  
  4557. - The, sys.prefix and sys.exec_prefix variables point to the directory 
  4558. where Python is installed, or to the top of the source tree, if it was run 
  4559. from there.
  4560.  
  4561. - The various os.path modules (posixpath, ntpath, macpath) now support
  4562. passing more than two arguments to the join() function, so
  4563. os.path.join(a, b, c) is the same as os.path.join(a, os.path.join(b,
  4564. c)).
  4565.  
  4566. - The ntpath module (normally used as os.path) supports ~ to $HOME 
  4567. expansion in expanduser().
  4568.  
  4569. - The freeze tool now works on Windows.
  4570.  
  4571. - See also the Tkinter category for a sad note on
  4572. _tkinter.createfilehandler().
  4573.  
  4574. - The truncate() method for file objects now works on Windows.
  4575.  
  4576. - Py_Initialize() is no longer called when the DLL is loaded.  You
  4577. must call it yourself.
  4578.  
  4579. - The time module's clock() function now has good precision through
  4580. the use of the Win32 API QueryPerformanceCounter().
  4581.  
  4582. - Mark Hammond will release Python 1.5 versions of PythonWin and his
  4583. other Windows specific code: the win32api extensions, COM/ActiveX
  4584. support, and the MFC interface.
  4585.  
  4586.  
  4587. Mac
  4588. ---
  4589.  
  4590. - As always, the Macintosh port will be done by Jack Jansen.  He will
  4591. make a separate announcement for the Mac specific source code and the
  4592. binary distribution(s) when these are ready.
  4593.  
  4594.  
  4595. ======================================================================
  4596.  
  4597.  
  4598. =====================================
  4599. ==> Release 1.4 (October 25 1996) <==
  4600. =====================================
  4601.  
  4602. (Starting in reverse chronological order:)
  4603.  
  4604. - Changed disclaimer notice.
  4605.  
  4606. - Added SHELL=/bin/sh to Misc/Makefile.pre.in -- some Make versions
  4607. default to the user's login shell.
  4608.  
  4609. - In Lib/tkinter/Tkinter.py, removed bogus binding of <Delete> in Text
  4610. widget, and bogus bspace() function.
  4611.  
  4612. - In Lib/cgi.py, bumped __version__ to 2.0 and restored a truncated
  4613. paragraph.
  4614.  
  4615. - Fixed the NT Makefile (PC/vc40.mak) for VC 4.0 to set /MD for all
  4616. subprojects, and to remove the (broken) experimental NumPy
  4617. subprojects.
  4618.  
  4619. - In Lib/py_compile.py, cast mtime to long() so it will work on Mac
  4620. (where os.stat() returns mtimes as floats.)
  4621. - Set self.rfile unbuffered (like self.wfile) in SocketServer.py, to
  4622. fix POST in CGIHTTPServer.py.
  4623.  
  4624. - Version 2.83 of Misc/python-mode.el for Emacs is included.
  4625.  
  4626. - In Modules/regexmodule.c, fixed symcomp() to correctly handle a new
  4627. group starting immediately after a group tag.
  4628.  
  4629. - In Lib/SocketServer.py, changed the mode for rfile to unbuffered.
  4630.  
  4631. - In Objects/stringobject.c, fixed the compare function to do the
  4632. first char comparison in unsigned mode, for consistency with the way
  4633. other characters are compared by memcmp().
  4634.  
  4635. - In Lib/tkinter/Tkinter.py, fixed Scale.get() to support floats.
  4636.  
  4637. - In Lib/urllib.py, fix another case where openedurl wasn't set.
  4638.  
  4639. (XXX Sorry, the rest is in totally random order.  No time to fix it.)
  4640.  
  4641. - SyntaxError exceptions detected during code generation
  4642. (e.g. assignment to an expression) now include a line number.
  4643.  
  4644. - Don't leave trailing / or \ in script directory inserted in front of
  4645. sys.path.
  4646.  
  4647. - Added a note to Tools/scripts/classfix.py abouts its historical
  4648. importance.
  4649.  
  4650. - Added Misc/Makefile.pre.in, a universal Makefile for extensions
  4651. built outside the distribution.
  4652.  
  4653. - Rewritten Misc/faq2html.py, by Ka-Ping Yee.
  4654.  
  4655. - Install shared modules with mode 555 (needed for performance on some
  4656. platforms).
  4657.  
  4658. - Some changes to standard library modules to avoid calling append()
  4659. with more than one argument -- while supported, this should be
  4660. outlawed, and I don't want to set a bad example.
  4661.  
  4662. - bdb.py (and hence pdb.py) supports calling run() with a code object
  4663. instead of a code string.
  4664.  
  4665. - Fixed an embarrassing bug cgi.py which prevented correct uploading
  4666. of binary files from Netscape (which doesn't distinguish between
  4667. binary and text files).  Also added dormant logging support, which
  4668. makes it easier to debug the cgi module itself.
  4669.  
  4670. - Added default writer to constructor of NullFormatter class.
  4671.  
  4672. - Use binary mode for socket.makefile() calls in ftplib.py.
  4673.  
  4674. - The ihooks module no longer "installs" itself upon import -- this
  4675. was an experimental feature that helped ironing out some bugs but that
  4676. slowed down code that imported it without the need to install it
  4677. (e.g. the rexec module).  Also close the file in some cases and add
  4678. the __file__ attribute to loaded modules.
  4679.  
  4680. - The test program for mailbox.py is now more useful.
  4681.  
  4682. - Added getparamnames() to Message class in mimetools.py -- it returns
  4683. the names of parameters to the content-type header.
  4684.  
  4685. - Fixed a typo in ni that broke the loop stripping "__." from names.
  4686.  
  4687. - Fix sys.path[0] for scripts run via pdb.py's new main program.
  4688.  
  4689. - profile.py can now also run a script, like pdb.
  4690.  
  4691. - Fix a small bug in pyclbr -- don't add names starting with _ when
  4692. emulating from ... import *.
  4693.  
  4694. - Fixed a series of embarrassing typos in rexec's handling of standard
  4695. I/O redirection.  Added some more "safe" built-in modules: cmath,
  4696. errno, operator.
  4697.  
  4698. - Fixed embarrassing typo in shelve.py.
  4699.  
  4700. - Added SliceType and EllipsisType to types.py.
  4701.  
  4702. - In urllib.py, added handling for error 301 (same as 302); added
  4703. geturl() method to get the URL after redirection.
  4704.  
  4705. - Fixed embarrassing typo in xdrlib.py.  Also fixed typo in Setup.in
  4706. for _xdrmodule.c and removed redundant #include from _xdrmodule.c.
  4707.  
  4708. - Fixed bsddbmodule.c to add binary mode indicator on platforms that
  4709. have it.  This should make it working on Windows NT.
  4710.  
  4711. - Changed last uses of #ifdef NT to #ifdef MS_WINDOWS or MS_WIN32,
  4712. whatever applies.  Also rationalized some other tests for various MS
  4713. platforms.
  4714.  
  4715. - Added the sources for the NT installer script used for Python
  4716. 1.4beta3.  Not tested with this release, but better than nothing.
  4717.  
  4718. - A compromise in pickle's defenses against Trojan horses: a
  4719. user-defined function is now okay where a class is expected.  A
  4720. built-in function is not okay, to prevent pickling something that
  4721. will execute os.system("rm -f *") when unpickling.
  4722.  
  4723. - dis.py will print the name of local variables referenced by local
  4724. load/store/delete instructions.
  4725.  
  4726. - Improved portability of SimpleHTTPServer module to non-Unix
  4727. platform.
  4728.  
  4729. - The thread.h interface adds an extra argument to down_sema().  This
  4730. only affects other C code that uses thread.c; the Python thread module
  4731. doesn't use semaphores (which aren't provided on all platforms where
  4732. Python threads are supported).  Note: on NT, this change is not
  4733. implemented.
  4734.  
  4735. - Fixed some typos in abstract.h; corrected signature of
  4736. PyNumber_Coerce, added PyMapping_DelItem.  Also fixed a bug in
  4737. abstract.c's PyObject_CallMethod().
  4738.  
  4739. - apply(classname, (), {}) now works even if the class has no
  4740. __init__() method.
  4741.  
  4742. - Implemented complex remainder and divmod() (these would dump core!).
  4743. Conversion of complex numbers to int, long int or float now raises an
  4744. exception, since there is no meaningful way to do it without losing
  4745. information.
  4746.  
  4747. - Fixed bug in built-in complex() function which gave the wrong result
  4748. for two real arguments.
  4749.  
  4750. - Change the hash algorithm for strings -- the multiplier is now
  4751. 1000003 instead of 3, which gives better spread for short strings.
  4752.  
  4753. - New default path for Windows NT, the registry structure now supports
  4754. default paths for different install packages.  (Mark Hammond -- the
  4755. next PythonWin release will use this.)
  4756.  
  4757. - Added more symbols to the python_nt.def file.
  4758.  
  4759. - When using GNU readline, set rl_readline_name to "python".
  4760.  
  4761. - The Ellipses built-in name has been renamed to Ellipsis -- this is
  4762. the correct singular form.  Thanks to Ka-Ping Yee, who saved us from
  4763. eternal embarrassment.
  4764.  
  4765. - Bumped the PYTHON_API_VERSION to 1006, due to the Ellipses ->
  4766. Ellipsis name change.
  4767.  
  4768. - Updated the library reference manual.  Added documentation of
  4769. restricted mode (rexec, Bastion) and the formatter module (for use
  4770. with the htmllib module).  Fixed the documentation of htmllib
  4771. (finally).
  4772.  
  4773. - The reference manual is now maintained in FrameMaker.
  4774.  
  4775. - Upgraded scripts Doc/partparse.py and Doc/texi2html.py.
  4776.  
  4777. - Slight improvements to Doc/Makefile.
  4778.  
  4779. - Added fcntl.lockf(). This should be used for Unix file locking
  4780. instead of the posixfile module; lockf() is more portable.
  4781.  
  4782. - The getopt module now supports long option names, thanks to Lars
  4783. Wizenius.
  4784.  
  4785. - Plenty of changes to Tkinter and Canvas, mostly due to Fred Drake
  4786. and Nils Fischbeck.
  4787.  
  4788. - Use more bits of time.time() in whrandom's default seed().
  4789.  
  4790. - Performance hack for regex module's regs attribute.
  4791.  
  4792. - Don't close already closed socket in socket module.
  4793.  
  4794. - Correctly handle separators containing embedded nulls in
  4795. strop.split, strop.find and strop.rfind.  Also added more detail to
  4796. error message for strop.atoi and friends.
  4797.  
  4798. - Moved fallback definition for hypot() to Python/hypot.c.
  4799.  
  4800. - Added fallback definition for strdup, in Python/strdup.c.
  4801.  
  4802. - Fixed some bugs where a function would return 0 to indicate an error
  4803. where it should return -1.
  4804.  
  4805. - Test for error returned by time.localtime(), and rationalized its MS
  4806. tests.
  4807.  
  4808. - Added Modules/Setup.local file, which is processed after Setup.
  4809.  
  4810. - Corrected bug in toplevel Makefile.in -- execution of regen script
  4811. would not use the right PATH and PYTHONPATH.
  4812.  
  4813. - Various and sundry NeXT configuration changes (sigh).
  4814.  
  4815. - Support systems where libreadline needs neither termcap nor curses.
  4816.  
  4817. - Improved ld_so_aix script and python.exp file (for AIX).
  4818.  
  4819. - More stringent test for working <stdarg.h> in configure script.
  4820.  
  4821. - Removed Demo/www subdirectory -- it was totally out of date.
  4822.  
  4823. - Improved demos and docs for Fred Drake's parser module; fixed one
  4824. typo in the module itself.
  4825.  
  4826.  
  4827. =========================================
  4828. ==> Release 1.4beta3 (August 26 1996) <==
  4829. =========================================
  4830.  
  4831.  
  4832. (XXX This is less readable that it should.  I promise to restructure
  4833. it for the final 1.4 release.)
  4834.  
  4835.  
  4836. What's new in 1.4beta3 (since beta2)?
  4837. -------------------------------------
  4838.  
  4839. - Name mangling to implement a simple form of class-private variables.
  4840. A name of the form "__spam" can't easily be used outside the class.
  4841. (This was added in 1.4beta3, but left out of the 1.4beta3 release
  4842. message.)
  4843.  
  4844. - In urllib.urlopen(): HTTP URLs containing user:passwd@host are now
  4845. handled correctly when using a proxy server.
  4846.  
  4847. - In ntpath.normpath(): don't truncate to 8+3 format.
  4848.  
  4849. - In mimetools.choose_boundary(): don't die when getuid() or getpid()
  4850. aren't defined.
  4851.  
  4852. - Module urllib: some optimizations to (un)quoting.
  4853.  
  4854. - New module MimeWriter for writing MIME documents.
  4855.  
  4856. - More changes to formatter module.
  4857.  
  4858. - The freeze script works once again and is much more robust (using
  4859. sys.prefix etc.).  It also supports a -o option to specify an
  4860. output directory.
  4861.  
  4862. - New module whichdb recognizes dbm, gdbm and bsddb/dbhash files.
  4863.  
  4864. - The Doc/Makefile targets have been reorganized somewhat to remove the 
  4865. insistence on always generating PostScript.
  4866.  
  4867. - The texinfo to html filter (Doc/texi2html.py) has been improved somewhat.
  4868.  
  4869. - "errors.h" has been renamed to "pyerrors.h" to resolve a long-standing 
  4870. name conflict on the Mac.
  4871.  
  4872. - Linking a module compiled with a different setting for Py_TRACE_REFS now 
  4873. generates a linker error rather than a core dump.
  4874.  
  4875. - The cgi module has a new convenience function print_exception(), which 
  4876. formats a python exception using HTML.  It also fixes a bug in the 
  4877. compatibility code and adds a dubious feature which makes it possible to 
  4878. have two query strings, one in the URL and one in the POST data.
  4879.  
  4880. - A subtle change in the unpickling of class instances makes it possible 
  4881. to unpickle in restricted execution mode, where the __dict__ attribute is 
  4882. not available (but setattr() is).
  4883.  
  4884. - Documentation for os.path.splitext() (== posixpath.splitext()) has been 
  4885. cleared up.  It splits at the *last* dot.
  4886.  
  4887. - posixfile locking is now also correctly supported on AIX.
  4888.  
  4889. - The tempfile module once again honors an initial setting of tmpdir.  It 
  4890. now works on Windows, too.
  4891.  
  4892. - The traceback module has some new functions to extract, format and print 
  4893. the active stack.
  4894.  
  4895. - Some translation functions in the urllib module have been made a little 
  4896. less sluggish.
  4897.  
  4898. - The addtag_* methods for Canvas widgets in Tkinter as well as in the 
  4899. separate Canvas class have been fixed so they actually do something 
  4900. meaningful.
  4901.  
  4902. - A tiny _test() function has been added to Tkinter.py.
  4903.  
  4904. - A generic Makefile for dynamically loaded modules is provided in the Misc 
  4905. subdirectory (Misc/gMakefile).
  4906.  
  4907. - A new version of python-mode.el for Emacs is provided.  See
  4908. http://www.python.org/ftp/emacs/pmdetails.html for details.  The
  4909. separate file pyimenu.el is no longer needed, imenu support is folded
  4910. into python-mode.el.
  4911.  
  4912. - The configure script can finally correctly find the readline library in a 
  4913. non-standard location.  The LDFLAGS variable is passed on the the Makefiles 
  4914. from the configure script.
  4915.  
  4916. - Shared libraries are now installed as programs (i.e. with executable 
  4917. permission).  This is required on HP-UX and won't hurt on other systems.
  4918.  
  4919. - The objc.c module is no longer part of the distribution.  Objective-C 
  4920. support may become available as contributed software on the ftp site.
  4921.  
  4922. - The sybase module is no longer part of the distribution.  A much
  4923. improved sybase module is available as contributed software from the
  4924. ftp site.
  4925.  
  4926. - _tkinter is now compatible with Tcl 7.5 / Tk 4.1 patch1 on Windows and 
  4927. Mac (don't use unpatched Tcl/Tk!).  The default line in the Setup.in file 
  4928. now links with Tcl 7.5 / Tk 4.1 rather than 7.4/4.0.
  4929.  
  4930. - In Setup, you can now write "*shared*" instead of "*noconfig*", and you 
  4931. can use *.so and *.sl as shared libraries.
  4932.  
  4933. - Some more fidgeting for AIX shared libraries.
  4934.  
  4935. - The mpz module is now compatible with GMP 2.x.  (Not tested by me.)
  4936. (Note -- a complete replacement by Niels Mo"ller, called gpmodule, is
  4937. available from the contrib directory on the ftp site.)
  4938.  
  4939. - A warning is written to sys.stderr when a __del__ method raises an 
  4940. exception (formerly, such exceptions were completely ignored).
  4941.  
  4942. - The configure script now defines HAVE_OLD_CPP if the C preprocessor is 
  4943. incapable of ANSI style token concatenation and stringification.
  4944.  
  4945. - All source files (except a few platform specific modules) are once again 
  4946. compatible with K&R C compilers as well as ANSI compilers.  In particular,
  4947. ANSI-isms have been removed or made conditional in complexobject.c, 
  4948. getargs.c and operator.c.
  4949.  
  4950. - The abstract object API has three new functions, PyObject_DelItem, 
  4951. PySequence_DelItem, and PySequence_DelSlice.
  4952.  
  4953. - The operator module has new functions delitem and delslice, and the 
  4954. functions "or" and "and" are renamed to "or_" and "and_" (since "or" and 
  4955. "and" are reserved words).  ("__or__" and "__and__" are unchanged.)
  4956.  
  4957. - The environment module is no longer supported; putenv() is now a function 
  4958. in posixmodule (also under NT).
  4959.  
  4960. - Error in filter(<function>, "") has been fixed.
  4961.  
  4962. - Unrecognized keyword arguments raise TypeError, not KeyError.
  4963.  
  4964. - Better portability, fewer bugs and memory leaks, fewer compiler warnings, 
  4965. some more documentation.
  4966.  
  4967. - Bug in float power boundary case (0.0 to the negative integer power) 
  4968. fixed.
  4969.  
  4970. - The test of negative number to the float power has been moved from the 
  4971. built-in pow() functin to floatobject.c (so complex numbers can yield the 
  4972. correct result).
  4973.  
  4974. - The bug introduced in beta2 where shared libraries loaded (using 
  4975. dlopen()) from the current directory would fail, has been fixed.
  4976.  
  4977. - Modules imported as shared libraries now also have a __file__ attribute, 
  4978. giving the filename from which they were loaded.  The only modules without 
  4979. a __file__ attribute now are built-in modules.
  4980.  
  4981. - On the Mac, dynamically loaded modules can end in either ".slb" or 
  4982. ".<platform>.slb" where <platform> is either "CFM68K" or "ppc".  The ".slb" 
  4983. extension should only be used for "fat" binaries.
  4984.  
  4985. - C API addition: marshal.c now supports 
  4986. PyMarshal_WriteObjectToString(object).
  4987.  
  4988. - C API addition: getargs.c now supports
  4989. PyArg_ParseTupleAndKeywords(args, kwdict, format, kwnames, ...)
  4990. to parse keyword arguments.
  4991.  
  4992. - The PC versioning scheme (sys.winver) has changed once again.  the 
  4993. version number is now "<digit>.<digit>.<digit>.<apiversion>", where the 
  4994. first three <digit>s are the Python version (e.g. "1.4.0" for Python 1.4, 
  4995. "1.4.1" for Python 1.4.1 -- the beta level is not included) and 
  4996. <apiversion> is the four-digit PYTHON_API_VERSION (currently 1005).
  4997.  
  4998. - h2py.py accepts whitespace before the # in CPP directives
  4999.  
  5000. - On Solaris 2.5, it should now be possible to use either Posix threads or 
  5001. Solaris threads (XXX: how do you select which is used???).  (Note: the 
  5002. Python pthreads interface doesn't fully support semaphores yet -- anyone 
  5003. care to fix this?)
  5004.  
  5005. - Thread support should now work on AIX, using either DCE threads or 
  5006. pthreads.
  5007.  
  5008. - New file Demo/sockets/unicast.py
  5009.  
  5010. - Working Mac port, with CFM68K support, with Tk 4.1 support (though not 
  5011. both) (XXX)
  5012.  
  5013. - New project setup for PC port, now compatible with PythonWin, with 
  5014. _tkinter and NumPy support (XXX)
  5015.  
  5016. - New module site.py (XXX)
  5017.  
  5018. - New module xdrlib.py and optional support module _xdrmodule.c (XXX)
  5019.  
  5020. - parser module adapted to new grammar, complete w/ Doc & Demo (XXX)
  5021.  
  5022. - regen script fixed (XXX)
  5023.  
  5024. - new machdep subdirectories Lib/{aix3,aix4,next3_3,freebsd2,linux2} (XXX)
  5025.  
  5026. - testall now also tests math module (XXX)
  5027.  
  5028. - string.atoi c.s. now raise an exception for an empty input string.
  5029.  
  5030. - At last, it is no longer necessary to define HAVE_CONFIG_H in order to 
  5031. have config.h included at various places.
  5032.  
  5033. - Unrecognized keyword arguments now raise TypeError rather than KeyError.
  5034.  
  5035. - The makesetup script recognizes files with extension .so or .sl as
  5036. (shared) libraries.
  5037.  
  5038. - 'access' is no longer a reserved word, and all code related to its 
  5039. implementation is gone (or at least #ifdef'ed out).  This should make 
  5040. Python a little speedier too!
  5041.  
  5042. - Performance enhancements suggested by Sjoerd Mullender.  This includes 
  5043. the introduction of two new optional function pointers in type object, 
  5044. getattro and setattro, which are like getattr and setattr but take a 
  5045. string object instead of a C string pointer.
  5046.  
  5047. - New operations in string module: lstrip(s) and rstrip(s) strip whitespace 
  5048. only on the left or only on the right, A new optional third argument to 
  5049. split() specifies the maximum number of separators honored (so 
  5050. splitfields(s, sep, n) returns a list of at most n+1 elements).  (Since 
  5051. 1.3, splitfields(s, None) is totally equivalent to split(s).)
  5052. string.capwords() has an optional second argument specifying the 
  5053. separator (which is passed to split()).
  5054.  
  5055. - regsub.split() has the same addition as string.split().  regsub.splitx(s, 
  5056. sep, maxsep) implements the functionality that was regsub.split(s, 1) in 
  5057. 1.4beta2 (return a list containing the delimiters as well as the words).
  5058.  
  5059. - Final touch for AIX loading, rewritten Misc/AIX-NOTES.
  5060.  
  5061. - In Modules/_tkinter.c, when using Tk 4.1 or higher, use className
  5062. argument to _tkinter.create() to set Tcl's argv0 variable, so X
  5063. resources use the right resource class again.
  5064.  
  5065. - Add #undef fabs to Modules/mathmodule.c for macintosh.
  5066.  
  5067. - Added some macro renames for AIX in Modules/operator.c.
  5068.  
  5069. - Removed spurious 'E' from Doc/liberrno.tex.
  5070.  
  5071. - Got rid of some cruft in Misc/ (dlMakefile, pyimenu.el); added new
  5072. Misc/gMakefile and new version of Misc/python-mode.el.
  5073.  
  5074. - Fixed typo in Lib/ntpath.py (islink has "return false" which gives a
  5075. NameError).
  5076.  
  5077. - Added missing "from types import *" to Lib/tkinter/Canvas.py.
  5078.  
  5079. - Added hint about using default args for __init__ to pickle docs.
  5080.  
  5081. - Corrected typo in Inclide/abstract.h: PySequence_Lenth ->
  5082. PySequence_Length.
  5083.  
  5084. - Some improvements to Doc/texi2html.py.
  5085.  
  5086. - In Python/import.c, Cast unsigned char * in struct _frozen to char *
  5087. in calls to rds_object().
  5088.  
  5089. - In doc/ref4.tex, added note about scope of lambda bodies.
  5090.  
  5091. What's new in 1.4beta2 (since beta1)?
  5092. -------------------------------------
  5093.  
  5094. - Portability bug in the md5.h header solved.
  5095.  
  5096. - The PC build procedure now really works, and sets sys.platform to a
  5097. meaningful value (a few things were botched in beta 1).  Lib/dos_8x3
  5098. is now a standard part of the distribution (alas).
  5099.  
  5100. - More improvements to the installation procedure.  Typing "make install" 
  5101. now inserts the version number in the pathnames of almost everything 
  5102. installed, and creates the machine dependent modules (FCNTL.py etc.) if not 
  5103. supplied by the distribution.  (XXX There's still a problem with the latter 
  5104. because the "regen" script requires that Python is installed.  Some manual 
  5105. intervention may still be required.) (This has been fixed in 1.4beta3.)
  5106.  
  5107. - New modules: errno, operator (XXX).
  5108.  
  5109. - Changes for use with Numerical Python: builtin function slice() and
  5110. Ellipses object, and corresponding syntax:
  5111.  
  5112.     x[lo:hi:stride]        ==    x[slice(lo, hi, stride)]
  5113.     x[a, ..., z]        ==    x[(a, Ellipses, z)]
  5114.  
  5115. - New documentation for errno and cgi mdoules.
  5116.  
  5117. - The directory containing the script passed to the interpreter is
  5118. inserted in from of sys.path; "." is no longer a default path
  5119. component.
  5120.  
  5121. - Optional third string argument to string.translate() specifies
  5122. characters to delete.  New function string.maketrans() creates a
  5123. translation table for translate() or for regex.compile().
  5124.  
  5125. - Module posix (and hence module os under Unix) now supports putenv().
  5126. Moreover, module os is enhanced so that if putenv() is supported,
  5127. assignments to os.environ entries make the appropriate putenv() call.
  5128. (XXX the putenv() implementation can leak a small amount of memory per
  5129. call.)
  5130.  
  5131. - pdb.py can now be invoked from the command line to debug a script:
  5132. python pdb.py <script> <arg> ...
  5133.  
  5134. - Much improved parseaddr() in rfc822.
  5135.  
  5136. - In cgi.py, you can now pass an alternative value for environ to
  5137. nearly all functions.
  5138.  
  5139. - You can now assign to instance variables whose name begins and ends
  5140. with '__'.
  5141.  
  5142. - New version of Fred Drake's parser module and associates (token,
  5143. symbol, AST).
  5144.  
  5145. - New PYTHON_API_VERSION value and .pyc file magic number (again!).
  5146.  
  5147. - The "complex" internal structure type is now called "Py_complex" to
  5148. avoid name conflicts.
  5149.  
  5150. - Numerous small bugs fixed.
  5151.  
  5152. - Slight pickle speedups.
  5153.  
  5154. - Some slight speedups suggested by Sjoerd (more coming in 1.4 final).
  5155.  
  5156. - NeXT portability mods by Bill Bumgarner integrated.
  5157.  
  5158. - Modules regexmodule.c, bsddbmodule.c and xxmodule.c have been
  5159. converted to new naming style.
  5160.  
  5161.  
  5162. What's new in 1.4beta1 (since 1.3)?
  5163. -----------------------------------
  5164.  
  5165. - Added sys.platform and sys.exec_platform for Bill Janssen.
  5166.  
  5167. - Installation has been completely overhauled.  "make install" now installs 
  5168. everything, not just the python binary.  Installation uses the install-sh 
  5169. script (borrowed from X11) to install each file.
  5170.  
  5171. - New functions in the posix module: mkfifo, plock, remove (== unlink),
  5172. and ftruncate.  More functions are also available under NT.
  5173.  
  5174. - New function in the fcntl module: flock.
  5175.  
  5176. - Shared library support for FreeBSD.
  5177.  
  5178. - The --with-readline option can now be used without a DIRECTORY argument, 
  5179. for systems where libreadline.* is in one of the standard places.  It is 
  5180. also possible for it to be a shared library.
  5181.  
  5182. - The extension tkinter has been renamed to _tkinter, to avoid confusion 
  5183. with Tkinter.py oncase insensitive file systems.  It now supports Tk 4.1 as 
  5184. well as 4.0.
  5185.  
  5186. - Author's change of address from CWI in Amsterdam, The Netherlands, to 
  5187. CNRI in Reston, VA, USA.
  5188.  
  5189. - The math.hypot() function is now always available (if it isn't found in 
  5190. the C math library, Python provides its own implementation).
  5191.  
  5192. - The latex documentation is now compatible with latex2e, thanks to David 
  5193. Ascher.
  5194.  
  5195. - The expression x**y is now equivalent to pow(x, y).
  5196.  
  5197. - The indexing expression x[a, b, c] is now equivalent to x[(a, b, c)].
  5198.  
  5199. - Complex numbers are now supported.  Imaginary constants are written with 
  5200. a 'j' or 'J' prefix, general complex numbers can be formed by adding a real 
  5201. part to an imaginary part, like 3+4j.  Complex numbers are always stored in 
  5202. floating point form, so this is equivalent to 3.0+4.0j.  It is also 
  5203. possible to create complex numbers with the new built-in function 
  5204. complex(re, [im]).  For the footprint-conscious, complex number support can 
  5205. be disabled by defining the symbol WITHOUT_COMPLEX.
  5206.  
  5207. - New built-in function list() is the long-awaited counterpart of tuple().
  5208.  
  5209. - There's a new "cmath" module which provides the same functions as the 
  5210. "math" library but with complex arguments and results.  (There are very 
  5211. good reasons why math.sqrt(-1) still raises an exception -- you have to use 
  5212. cmath.sqrt(-1) to get 1j for an answer.)
  5213.  
  5214. - The Python.h header file (which is really the same as allobjects.h except 
  5215. it disables support for old style names) now includes several more files, 
  5216. so you have to have fewer #include statements in the average extension.
  5217.  
  5218. - The NDEBUG symbol is no longer used.  Code that used to be dependent on 
  5219. the presence of NDEBUG is now present on the absence of DEBUG.  TRACE_REFS 
  5220. and REF_DEBUG have been renamed to Py_TRACE_REFS and Py_REF_DEBUG, 
  5221. respectively.  At long last, the source actually compiles and links without 
  5222. errors when this symbol is defined.
  5223.  
  5224. - Several symbols that didn't follow the new naming scheme have been 
  5225. renamed (usually by adding to rename2.h) to use a Py or _Py prefix.  There 
  5226. are no external symbols left without a Py or _Py prefix, not even those 
  5227. defined by sources that were incorporated from elsewhere (regexpr.c, 
  5228. md5c.c).  (Macros are a different story...)
  5229.  
  5230. - There are now typedefs for the structures defined in config.c and 
  5231. frozen.c.
  5232.  
  5233. - New PYTHON_API_VERSION value and .pyc file magic number.
  5234.  
  5235. - New module Bastion.  (XXX)
  5236.  
  5237. - Improved performance of StringIO module.
  5238.  
  5239. - UserList module now supports + and * operators.
  5240.  
  5241. - The binhex and binascii modules now actually work.
  5242.  
  5243. - The cgi module has been almost totally rewritten and documented.
  5244. It now supports file upload and a new data type to handle forms more 
  5245. flexibly.
  5246.  
  5247. - The formatter module (for use with htmllib) has been overhauled (again).
  5248.  
  5249. - The ftplib module now supports passive mode and has doc strings.
  5250.  
  5251. - In (ideally) all places where binary files are read or written, the file 
  5252. is now correctly opened in binary mode ('rb' or 'wb') so the code will work 
  5253. on Mac or PC.
  5254.  
  5255. - Dummy versions of os.path.expandvars() and expanduser() are now provided 
  5256. on non-Unix platforms.
  5257.  
  5258. - Module urllib now has two new functions url2pathname and pathname2url 
  5259. which turn local filenames into "file:..." URLs using the same rules as 
  5260. Netscape (why be different).  it also supports urlretrieve() with a 
  5261. pathname parameter, and honors the proxy environment variables (http_proxy 
  5262. etc.).  The URL parsing has been improved somewhat, too.
  5263.  
  5264. - Micro improvements to urlparse.  Added urlparse.urldefrag() which 
  5265. removes a trailing ``#fragment'' if any.
  5266.  
  5267. - The mailbox module now supports MH style message delimiters as well.
  5268.  
  5269. - The mhlib module contains some new functionality: setcontext() to set the 
  5270. current folder and parsesequence() to parse a sequence as commonly passed 
  5271. to MH commands (e.g. 1-10 or last:5).
  5272.  
  5273. - New module mimify for conversion to and from MIME format of email 
  5274. messages.
  5275.  
  5276. - Module ni now automatically installs itself when first imported -- this 
  5277. is against the normal rule that modules should define classes and functions 
  5278. but not invoke them, but appears more useful in the case that two 
  5279. different, independent modules want to use ni's features.
  5280.  
  5281. - Some small performance enhancements in module pickle.
  5282.  
  5283. - Small interface change to the profile.run*() family of functions -- more 
  5284. sensible handling of return values.
  5285.  
  5286. - The officially registered Mac creator for Python files is 'Pyth'.  This 
  5287. replaces 'PYTH' which was used before but never registered.
  5288.  
  5289. - Added regsub.capwords().  (XXX)
  5290.  
  5291. - Added string.capwords(), string.capitalize() and string.translate().  
  5292. (XXX)
  5293.  
  5294. - Fixed an interface bug in the rexec module: it was impossible to pass a 
  5295. hooks instance to the RExec class.  rexec now also supports the dynamic 
  5296. loading of modules from shared libraries.  Some other interfaces have been 
  5297. added too.
  5298.  
  5299. - Module rfc822 now caches the headers in a dictionary for more efficient 
  5300. lookup.
  5301.  
  5302. - The sgmllib module now understands a limited number of SGML "shorthands" 
  5303. like <A/.../ for <A>...</A>.  (It's not clear that this was a good idea...)
  5304.  
  5305. - The tempfile module actually tries a number of different places to find a 
  5306. usable temporary directory.  (This was prompted by certain Linux 
  5307. installations that appear to be missing a /usr/tmp directory.) [A bug in 
  5308. the implementation that would ignore a pre-existing tmpdir global has been 
  5309. fixed in beta3.]
  5310.  
  5311. - Much improved and enhanved FileDialog module for Tkinter.
  5312.  
  5313. - Many small changes to Tkinter, to bring it more in line with Tk 4.0 (as 
  5314. well as Tk 4.1).
  5315.  
  5316. - New socket interfaces include ntohs(), ntohl(), htons(), htonl(), and 
  5317. s.dup().  Sockets now work correctly on Windows.  On Windows, the built-in 
  5318. extension is called _socket and a wrapper module win/socket.py provides 
  5319. "makefile()" and "dup()" functionality.  On Windows, the select module 
  5320. works only with socket objects.
  5321.  
  5322. - Bugs in bsddb module fixed (e.g. missing default argument values).
  5323.  
  5324. - The curses extension now includes <ncurses.h> when available.
  5325.  
  5326. - The gdbm module now supports opening databases in "fast" mode by 
  5327. specifying 'f' as the second character or the mode string.
  5328.  
  5329. - new variables sys.prefix and sys.exec_prefix pass corresponding 
  5330. configuration options / Makefile variables to the Python programmer.
  5331.  
  5332. - The ``new'' module now supports creating new user-defined classes as well 
  5333. as instances thereof.
  5334.  
  5335. - The soundex module now sports get_soundex() to get the soundex value for an 
  5336. arbitrary string (formerly it would only do soundex-based string 
  5337. comparison) as well as doc strings.
  5338.  
  5339. - New object type "cobject" to safely wrap void pointers for passing them 
  5340. between various extension modules.
  5341.  
  5342. - More efficient computation of float**smallint.
  5343.  
  5344. - The mysterious bug whereby "x.x" (two occurrences of the same 
  5345. one-character name) typed from the commandline would sometimes fail 
  5346. mysteriously.
  5347.  
  5348. - The initialization of the readline function can now be invoked by a C 
  5349. extension through PyOS_ReadlineInit().
  5350.  
  5351. - There's now an externally visible pointer PyImport_FrozenModules which 
  5352. can be changed by an embedding application.
  5353.  
  5354. - The argument parsing functions now support a new format character 'D' to 
  5355. specify complex numbers.
  5356.  
  5357. - Various memory leaks plugged and bugs fixed.
  5358.  
  5359. - Improved support for posix threads (now that real implementations are 
  5360. beginning to apepar).  Still no fully functioning semaphores.
  5361.  
  5362. - Some various and sundry improvements and new entries in the Tools 
  5363. directory.
  5364.  
  5365.  
  5366. =====================================
  5367. ==> Release 1.3 (13 October 1995) <==
  5368. =====================================
  5369.  
  5370. Major change
  5371. ============
  5372.  
  5373. Two words: Keyword Arguments.  See the first section of Chapter 12 of
  5374. the Tutorial.
  5375.  
  5376. (The rest of this file is textually the same as the remaining sections
  5377. of that chapter.)
  5378.  
  5379.  
  5380. Changes to the WWW and Internet tools
  5381. =====================================
  5382.  
  5383. The "htmllib" module has been rewritten in an incompatible fashion.
  5384. The new version is considerably more complete (HTML 2.0 except forms,
  5385. but including all ISO-8859-1 entity definitions), and easy to use.
  5386. Small changes to "sgmllib" have also been made, to better match the
  5387. tokenization of HTML as recognized by other web tools.
  5388.  
  5389. A new module "formatter" has been added, for use with the new
  5390. "htmllib" module.
  5391.  
  5392. The "urllib"and "httplib" modules have been changed somewhat to allow
  5393. overriding unknown URL types and to support authentication.  They now
  5394. use "mimetools.Message" instead of "rfc822.Message" to parse headers.
  5395. The "endrequest()" method has been removed from the HTTP class since
  5396. it breaks the interaction with some servers.
  5397.  
  5398. The "rfc822.Message" class has been changed to allow a flag to be
  5399. passed in that says that the file is unseekable.
  5400.  
  5401. The "ftplib" module has been fixed to be (hopefully) more robust on
  5402. Linux.
  5403.  
  5404. Several new operations that are optionally supported by servers have
  5405. been added to "nntplib": "xover", "xgtitle", "xpath" and "date".
  5406.  
  5407. Other Language Changes
  5408. ======================
  5409.  
  5410. The "raise" statement now takes an optional argument which specifies
  5411. the traceback to be used when printing the exception's stack trace.
  5412. This must be a traceback object, such as found in "sys.exc_traceback".
  5413. When omitted or given as "None", the old behavior (to generate a stack
  5414. trace entry for the current stack frame) is used.
  5415.  
  5416. The tokenizer is now more tolerant of alien whitespace.  Control-L in
  5417. the leading whitespace of a line resets the column number to zero,
  5418. while Control-R just before the end of the line is ignored.
  5419.  
  5420. Changes to Built-in Operations
  5421. ==============================
  5422.  
  5423. For file objects, "f.read(0)" and "f.readline(0)" now return an empty
  5424. string rather than reading an unlimited number of bytes.  For the
  5425. latter, omit the argument altogether or pass a negative value.
  5426.  
  5427. A new system variable, "sys.platform", has been added.  It specifies
  5428. the current platform, e.g. "sunos5" or "linux1".
  5429.  
  5430. The built-in functions "input()" and "raw_input()" now use the GNU
  5431. readline library when it has been configured (formerly, only
  5432. interactive input to the interpreter itself was read using GNU
  5433. readline).  The GNU readline library provides elaborate line editing
  5434. and history.  The Python debugger ("pdb") is the first beneficiary of
  5435. this change.
  5436.  
  5437. Two new built-in functions, "globals()" and "locals()", provide access
  5438. to dictionaries containming current global and local variables,
  5439. respectively.  (These augment rather than replace "vars()", which
  5440. returns the current local variables when called without an argument,
  5441. and a module's global variables when called with an argument of type
  5442. module.)
  5443.  
  5444. The built-in function "compile()" now takes a third possible value for
  5445. the kind of code to be compiled: specifying "'single'" generates code
  5446. for a single interactive statement, which prints the output of
  5447. expression statements that evaluate to something else than "None".
  5448.  
  5449. Library Changes
  5450. ===============
  5451.  
  5452. There are new module "ni" and "ihooks" that support importing modules
  5453. with hierarchical names such as "A.B.C".  This is enabled by writing
  5454. "import ni; ni.ni()" at the very top of the main program.  These
  5455. modules are amply documented in the Python source.
  5456.  
  5457. The module "rexec" has been rewritten (incompatibly) to define a class
  5458. and to use "ihooks".
  5459.  
  5460. The "string.split()" and "string.splitfields()" functions are now the
  5461. same function (the presence or absence of the second argument
  5462. determines which operation is invoked); similar for "string.join()"
  5463. and "string.joinfields()".
  5464.  
  5465. The "Tkinter" module and its helper "Dialog" have been revamped to use
  5466. keyword arguments.  Tk 4.0 is now the standard.  A new module
  5467. "FileDialog" has been added which implements standard file selection
  5468. dialogs.
  5469.  
  5470. The optional built-in modules "dbm" and "gdbm" are more coordinated
  5471. --- their "open()" functions now take the same values for their "flag"
  5472. argument, and the "flag" and "mode" argument have default values (to
  5473. open the database for reading only, and to create the database with
  5474. mode "0666" minuse the umask, respectively).  The memory leaks have
  5475. finally been fixed.
  5476.  
  5477. A new dbm-like module, "bsddb", has been added, which uses the BSD DB
  5478. package's hash method.
  5479.  
  5480. A portable (though slow) dbm-clone, implemented in Python, has been
  5481. added for systems where none of the above is provided.  It is aptly
  5482. dubbed "dumbdbm".
  5483.  
  5484. The module "anydbm" provides a unified interface to "bsddb", "gdbm",
  5485. "dbm", and "dumbdbm", choosing the first one available.
  5486.  
  5487. A new extension module, "binascii", provides a variety of operations
  5488. for conversion of text-encoded binary data.
  5489.  
  5490. There are three new or rewritten companion modules implemented in
  5491. Python that can encode and decode the most common such formats: "uu"
  5492. (uuencode), "base64" and "binhex".
  5493.  
  5494. A module to handle the MIME encoding quoted-printable has also been
  5495. added: "quopri".
  5496.  
  5497. The parser module (which provides an interface to the Python parser's
  5498. abstract syntax trees) has been rewritten (incompatibly) by Fred
  5499. Drake.  It now lets you change the parse tree and compile the result!
  5500.  
  5501. The \code{syslog} module has been upgraded and documented.
  5502.  
  5503. Other Changes
  5504. =============
  5505.  
  5506. The dynamic module loader recognizes the fact that different filenames
  5507. point to the same shared library and loads the library only once, so
  5508. you can have a single shared library that defines multiple modules.
  5509. (SunOS / SVR4 style shared libraries only.)
  5510.  
  5511. Jim Fulton's ``abstract object interface'' has been incorporated into
  5512. the run-time API.  For more detailes, read the files
  5513. "Include/abstract.h" and "Objects/abstract.c".
  5514.  
  5515. The Macintosh version is much more robust now.
  5516.  
  5517. Numerous things I have forgotten or that are so obscure no-one will
  5518. notice them anyway :-)
  5519.  
  5520.  
  5521. ===================================
  5522. ==> Release 1.2 (13 April 1995) <==
  5523. ===================================
  5524.  
  5525. - Changes to Misc/python-mode.el:
  5526.   - Wrapping and indentation within triple quote strings should work
  5527.     properly now.
  5528.   - `Standard' bug reporting mechanism (use C-c C-b)
  5529.   - py-mark-block was moved to C-c C-m
  5530.   - C-c C-v shows you the python-mode version
  5531.   - a basic python-font-lock-keywords has been added for Emacs 19
  5532.     font-lock colorizations.
  5533.   - proper interaction with pending-del and del-sel modes.
  5534.   - New py-electric-colon (:) command for improved outdenting.  Also
  5535.     py-indent-line (TAB) should handle outdented lines better.
  5536.   - New commands py-outdent-left (C-c C-l) and py-indent-right (C-c C-r)
  5537.  
  5538. - The Library Reference has been restructured, and many new and
  5539. existing modules are now documented, in particular the debugger and
  5540. the profiler, as well as the persistency and the WWW/Internet support
  5541. modules.
  5542.  
  5543. - All known bugs have been fixed.  For example the pow(2,2,3L) bug on
  5544. Linux has been fixed.  Also the re-entrancy problems with __del__ have
  5545. been fixed.
  5546.  
  5547. - All known memory leaks have been fixed.
  5548.  
  5549. - Phase 2 of the Great Renaming has been executed.  The header files
  5550. now use the new names (PyObject instead of object, etc.).  The linker
  5551. also sees the new names.  Most source files still use the old names,
  5552. by virtue of the rename2.h header file.  If you include Python.h, you
  5553. only see the new names.  Dynamically linked modules have to be
  5554. recompiled.  (Phase 3, fixing the rest of the sources, will be
  5555. executed gradually with the release later versions.)
  5556.  
  5557. - The hooks for implementing "safe-python" (better called "restricted
  5558. execution") are in place.  Specifically, the import statement is
  5559. implemented by calling the built-in function __import__, and the
  5560. built-in names used in a particular scope are taken from the
  5561. dictionary __builtins__ in that scope's global dictionary.  See also
  5562. the new (unsupported, undocumented) module rexec.py.
  5563.  
  5564. - The import statement now supports the syntax "import a.b.c" and
  5565. "from a.b.c import name".  No officially supported implementation
  5566. exists, but one can be prototyped by replacing the built-in __import__
  5567. function.  A proposal by Ken Manheimer is provided as newimp.py.
  5568.  
  5569. - All machinery used by the import statement (or the built-in
  5570. __import__ function) is now exposed through the new built-in module
  5571. "imp" (see the library reference manual).  All dynamic loading
  5572. machinery is moved to the new file importdl.c.
  5573.  
  5574. - Persistent storage is supported through the use of the modules
  5575. "pickle" and "shelve" (implemented in Python).  There's also a "copy"
  5576. module implementing deepcopy and normal (shallow) copy operations.
  5577. See the library reference manual.
  5578.  
  5579. - Documentation strings for many objects types are accessible through
  5580. the __doc__ attribute.  Modules, classes and functions support special
  5581. syntax to initialize the __doc__ attribute: if the first statement
  5582. consists of just a string literal, that string literal becomes the
  5583. value of the __doc__ attribute.  The default __doc__ attribute is
  5584. None.  Documentation strings are also supported for built-in
  5585. functions, types and modules; however this feature hasn't been widely
  5586. used yet.  See the 'new' module for an example.  (Basically, the type
  5587. object's tp_doc field contains the doc string for the type, and the
  5588. 4th member of the methodlist structure contains the doc string for the
  5589. method.)
  5590.  
  5591. - The __coerce__ and __cmp__ methods for user-defined classes once
  5592. again work as expected.  As an example, there's a new standard class
  5593. Complex in the library.
  5594.  
  5595. - The functions posix.popen() and posix.fdopen() now have an optional
  5596. third argument to specify the buffer size, and default their second
  5597. (mode) argument to 'r' -- in analogy to the builtin open() function.
  5598. The same applies to posixfile.open() and the socket method makefile().
  5599.  
  5600. - The thread.exit_thread() function now raises SystemExit so that
  5601. 'finally' clauses are honored and a memory leak is plugged.
  5602.  
  5603. - Improved X11 and Motif support, by Sjoerd Mullender.  This extension
  5604. is being maintained and distributed separately.
  5605.  
  5606. - Improved support for the Apple Macintosh, in part by Jack Jansen,
  5607. e.g. interfaces to (a few) resource mananger functions, get/set file
  5608. type and creator, gestalt, sound manager, speech manager, MacTCP, comm
  5609. toolbox, and the think C console library.  This is being maintained
  5610. and distributed separately.
  5611.  
  5612. - Improved version for Windows NT, by Mark Hammond.  This is being
  5613. maintained and distributed separately.
  5614.  
  5615. - Used autoconf 2.0 to generate the configure script.  Adapted
  5616. configure.in to use the new features in autoconf 2.0.
  5617.  
  5618. - It now builds on the NeXT without intervention, even on the 3.3
  5619. Sparc pre-release.
  5620.  
  5621. - Characters passed to isspace() and friends are masked to nonnegative
  5622. values.
  5623.  
  5624. - Correctly compute pow(-3.0, 3).
  5625.  
  5626. - Fix portability problems with getopt (configure now checks for a
  5627. non-GNU getopt).
  5628.  
  5629. - Don't add frozenmain.o to libPython.a.
  5630.  
  5631. - Exceptions can now be classes.  ALl built-in exceptions are still
  5632. string objects, but this will change in the future.
  5633.  
  5634. - The socket module exports a long list of socket related symbols.
  5635. (More built-in modules will export their symbolic constants instead of
  5636. relying on a separately generated Python module.)
  5637.  
  5638. - When a module object is deleted, it clears out its own dictionary.
  5639. This fixes a circularity in the references between functions and
  5640. their global dictionary.
  5641.  
  5642. - Changed the error handling by [new]getargs() e.g. for "O&".
  5643.  
  5644. - Dynamic loading of modules using shared libraries is supported for
  5645. several new platforms.
  5646.  
  5647. - Support "O&", "[...]" and "{...}" in mkvalue().
  5648.  
  5649. - Extension to findmethod(): findmethodinchain() (where a chain is a
  5650. linked list of methodlist arrays).  The calling interface for
  5651. findmethod() has changed: it now gets a pointer to the (static!)
  5652. methodlist structure rather than just to the function name -- this
  5653. saves copying flags etc. into the (short-lived) method object.
  5654.  
  5655. - The callable() function is now public.
  5656.  
  5657. - Object types can define a few new operations by setting function
  5658. pointers in the type object structure: tp_call defines how an object
  5659. is called, and tp_str defines how an object's str() is computed.
  5660.  
  5661.  
  5662. ===================================
  5663. ==> Release 1.1.1 (10 Nov 1994) <==
  5664. ===================================
  5665.  
  5666. This is a pure bugfix release again.  See the ChangeLog file for details.
  5667.  
  5668. One exception: a few new features were added to tkinter.
  5669.  
  5670.  
  5671. =================================
  5672. ==> Release 1.1 (11 Oct 1994) <==
  5673. =================================
  5674.  
  5675. This release adds several new features, improved configuration and
  5676. portability, and fixes more bugs than I can list here (including some
  5677. memory leaks).
  5678.  
  5679. The source compiles and runs out of the box on more platforms than
  5680. ever -- including Windows NT.  Makefiles or projects for a variety of
  5681. non-UNIX platforms are provided.
  5682.  
  5683. APOLOGY: some new features are badly documented or not at all.  I had
  5684. the choice -- postpone the new release indefinitely, or release it
  5685. now, with working code but some undocumented areas.  The problem with
  5686. postponing the release is that people continue to suffer from existing
  5687. bugs, and send me patches based on the previous release -- which I
  5688. can't apply directly because my own source has changed.  Also, some
  5689. new modules (like signal) have been ready for release for quite some
  5690. time, and people are anxiously waiting for them.  In the case of
  5691. signal, the interface is simple enough to figure out without
  5692. documentation (if you're anxious enough :-).  In this case it was not
  5693. simple to release the module on its own, since it relies on many small
  5694. patches elsewhere in the source.
  5695.  
  5696. For most new Python modules, the source code contains comments that
  5697. explain how to use them.  Documentation for the Tk interface, written
  5698. by Matt Conway, is available as tkinter-doc.tar.gz from the Python
  5699. home and mirror ftp sites (see Misc/FAQ for ftp addresses).  For the
  5700. new operator overloading facilities, have a look at Demo/classes:
  5701. Complex.py and Rat.py show how to implement a numeric type without and
  5702. with __coerce__ method.  Also have a look at the end of the Tutorial
  5703. document (Doc/tut.tex).  If you're still confused: use the newsgroup
  5704. or mailing list.
  5705.  
  5706.  
  5707. New language features:
  5708.  
  5709.     - More flexible operator overloading for user-defined classes
  5710.     (INCOMPATIBLE WITH PREVIOUS VERSIONS!)  See end of tutorial.
  5711.  
  5712.     - Classes can define methods named __getattr__, __setattr__ and
  5713.     __delattr__ to trap attribute accesses.  See end of tutorial.
  5714.  
  5715.     - Classes can define method __call__ so instances can be called
  5716.     directly.  See end of tutorial.
  5717.  
  5718.  
  5719. New support facilities:
  5720.  
  5721.     - The Makefiles (for the base interpreter as well as for extensions)
  5722.     now support creating dynamically loadable modules if the platform
  5723.     supports shared libraries.
  5724.  
  5725.     - Passing the interpreter a .pyc file as script argument will execute
  5726.     the code in that file.  (On the Mac such files can be double-clicked!)
  5727.  
  5728.     - New Freeze script, to create independently distributable "binaries"
  5729.     of Python programs -- look in Demo/freeze
  5730.  
  5731.     - Improved h2py script (in Demo/scripts) follows #includes and
  5732.     supports macros with one argument
  5733.  
  5734.     - New module compileall generates .pyc files for all modules in a
  5735.     directory (tree) without also executing them
  5736.  
  5737.     - Threads should work on more platforms
  5738.  
  5739.  
  5740. New built-in modules:
  5741.  
  5742.     - tkinter (support for Tcl's Tk widget set) is now part of the base
  5743.     distribution
  5744.  
  5745.     - signal allows catching or ignoring UNIX signals (unfortunately still
  5746.     undocumented -- any taker?)
  5747.  
  5748.     - termios provides portable access to POSIX tty settings
  5749.  
  5750.     - curses provides an interface to the System V curses library
  5751.  
  5752.     - syslog provides an interface to the (BSD?) syslog daemon
  5753.  
  5754.     - 'new' provides interfaces to create new built-in object types
  5755.     (e.g. modules and functions)
  5756.  
  5757.     - sybase provides an interface to SYBASE database
  5758.  
  5759.  
  5760. New/obsolete built-in methods:
  5761.  
  5762.     - callable(x) tests whether x can be called
  5763.  
  5764.     - sockets now have a setblocking() method
  5765.  
  5766.     - sockets no longer have an allowbroadcast() method
  5767.  
  5768.     - socket methods send() and sendto() return byte count
  5769.  
  5770.  
  5771. New standard library modules:
  5772.  
  5773.     - types.py defines standard names for built-in types, e.g. StringType
  5774.  
  5775.     - urlparse.py parses URLs according to the latest Internet draft
  5776.  
  5777.     - uu.py does uuencode/uudecode (not the fastest in the world, but
  5778.     quicker than installing uuencode on a non-UNIX machine :-)
  5779.  
  5780.     - New, faster and more powerful profile module.py
  5781.  
  5782.     - mhlib.py provides interface to MH folders and messages
  5783.  
  5784.  
  5785. New facilities for extension writers (unfortunately still
  5786. undocumented):
  5787.  
  5788.     - newgetargs() supports optional arguments and improved error messages
  5789.  
  5790.     - O!, O& O? formats for getargs allow more versatile type checking of
  5791.     non-standard types
  5792.  
  5793.     - can register pending asynchronous callback, to be called the next
  5794.     time the Python VM begins a new instruction (Py_AddPendingCall)
  5795.  
  5796.     - can register cleanup routines to be called when Python exits
  5797.     (Py_AtExit)
  5798.  
  5799.     - makesetup script understands C++ files in Setup file (use file.C
  5800.     or file.cc)
  5801.  
  5802.     - Make variable OPT is passed on to sub-Makefiles
  5803.  
  5804.     - An init<module>() routine may signal an error by not entering
  5805.     the module in the module table and raising an exception instead
  5806.  
  5807.     - For long module names, instead of foobarbletchmodule.c you can
  5808.     use foobarbletch.c
  5809.  
  5810.     - getintvalue() and getfloatvalue() try to convert any object
  5811.     instead of requiring an "intobject" or "floatobject"
  5812.  
  5813.     - All the [new]getargs() formats that retrieve an integer value
  5814.     will now also work if a float is passed
  5815.  
  5816.     - C function listtuple() converts list to tuple, fast
  5817.  
  5818.     - You should now call sigcheck() instead of intrcheck();
  5819.     sigcheck() also sets an exception when it returns nonzero
  5820.  
  5821.  
  5822. ====================================
  5823. ==> Release 1.0.3 (14 July 1994) <==
  5824. ====================================
  5825.  
  5826. This release consists entirely of bug fixes to the C sources; see the
  5827. head of ../ChangeLog for a complete list.  Most important bugs fixed:
  5828.  
  5829. - Sometimes the format operator (string%expr) would drop the last
  5830. character of the format string
  5831.  
  5832. - Tokenizer looped when last line did not end in \n
  5833.  
  5834. - Bug when triple-quoted string ended in quote plus newline
  5835.  
  5836. - Typo in socketmodule (listen) (== instead of =)
  5837.  
  5838. - typing vars() at the >>> prompt would cause recursive output
  5839.  
  5840.  
  5841. ==================================
  5842. ==> Release 1.0.2 (4 May 1994) <==
  5843. ==================================
  5844.  
  5845. Overview of the most visible changes.  Bug fixes are not listed.  See
  5846. also ChangeLog.
  5847.  
  5848. Tokens
  5849. ------
  5850.  
  5851. * String literals follow Standard C rules: they may be continued on
  5852. the next line using a backslash; adjacent literals are concatenated
  5853. at compile time.
  5854.  
  5855. * A new kind of string literals, surrounded by triple quotes (""" or
  5856. '''), can be continued on the next line without a backslash.
  5857.  
  5858. Syntax
  5859. ------
  5860.  
  5861. * Function arguments may have a default value, e.g. def f(a, b=1);
  5862. defaults are evaluated at function definition time.  This also applies
  5863. to lambda.
  5864.  
  5865. * The try-except statement has an optional else clause, which is
  5866. executed when no exception occurs in the try clause.
  5867.  
  5868. Interpreter
  5869. -----------
  5870.  
  5871. * The result of a statement-level expression is no longer printed,
  5872. except_ for expressions entered interactively.  Consequently, the -k
  5873. command line option is gone.
  5874.  
  5875. * The result of the last printed interactive expression is assigned to
  5876. the variable '_'.
  5877.  
  5878. * Access to implicit global variables has been speeded up by removing
  5879. an always-failing dictionary lookup in the dictionary of local
  5880. variables (mod suggested by Steve Makewski and Tim Peters).
  5881.  
  5882. * There is a new command line option, -u, to force stdout and stderr
  5883. to be unbuffered.
  5884.  
  5885. * Incorporated Steve Majewski's mods to import.c for dynamic loading
  5886. under AIX.
  5887.  
  5888. * Fewer chances of dumping core when trying to reload or re-import
  5889. static built-in, dynamically loaded built-in, or frozen modules.
  5890.  
  5891. * Loops over sequences now don't ask for the sequence's length when
  5892. they start, but try to access items 0, 1, 2, and so on until they hit
  5893. an IndexError.  This makes it possible to create classes that generate
  5894. infinite or indefinite sequences a la Steve Majewski.  This affects
  5895. for loops, the (not) in operator, and the built-in functions filter(),
  5896. map(), max(), min(), reduce().
  5897.  
  5898. Changed Built-in operations
  5899. ---------------------------
  5900.  
  5901. * The '%' operator on strings (printf-style formatting) supports a new
  5902. feature (adapted from a patch by Donald Beaudry) to allow
  5903. '%(<key>)<format>' % {...} to take values from a dictionary by name
  5904. instead of from a tuple by position (see also the new function
  5905. vars()).
  5906.  
  5907. * The '%s' formatting operator is changed to accept any type and
  5908. convert it to a string using str().
  5909.  
  5910. * Dictionaries with more than 20,000 entries can now be created
  5911. (thanks to Steve Kirsch).
  5912.  
  5913. New Built-in Functions
  5914. ----------------------
  5915.  
  5916. * vars() returns a dictionary containing the local variables; vars(m)
  5917. returns a dictionary containing the variables of module m.  Note:
  5918. dir(x) is now equivalent to vars(x).keys().
  5919.  
  5920. Changed Built-in Functions
  5921. --------------------------
  5922.  
  5923. * open() has an optional third argument to specify the buffer size: 0
  5924. for unbuffered, 1 for line buffered, >1 for explicit buffer size, <0
  5925. for default.
  5926.  
  5927. * open()'s second argument is now optional; it defaults to "r".
  5928.  
  5929. * apply() now checks that its second argument is indeed a tuple.
  5930.  
  5931. New Built-in Modules
  5932. --------------------
  5933.  
  5934. Changed Built-in Modules
  5935. ------------------------
  5936.  
  5937. The thread module no longer supports exit_prog().
  5938.  
  5939. New Python Modules
  5940. ------------------
  5941.  
  5942. * Module addpack contains a standard interface to modify sys.path to
  5943. find optional packages (groups of related modules).
  5944.  
  5945. * Module urllib contains a number of functions to access
  5946. World-Wide-Web files specified by their URL.
  5947.  
  5948. * Module httplib implements the client side of the HTTP protocol used
  5949. by World-Wide-Web servers.
  5950.  
  5951. * Module gopherlib implements the client side of the Gopher protocol.
  5952.  
  5953. * Module mailbox (by Jack Jansen) contains a parser for UNIX and MMDF
  5954. style mailbox files.
  5955.  
  5956. * Module random contains various random distributions, e.g. gauss().
  5957.  
  5958. * Module lockfile locks and unlocks open files using fcntl (inspired
  5959. by a similar module by Andy Bensky).
  5960.  
  5961. * Module ntpath (by Jaap Vermeulen) implements path operations for
  5962. Windows/NT.
  5963.  
  5964. * Module test_thread (in Lib/test) contains a small test set for the
  5965. thread module.
  5966.  
  5967. Changed Python Modules
  5968. ----------------------
  5969.  
  5970. * The string module's expandvars() function is now documented and is
  5971. implemented in Python (using regular expressions) instead of forking
  5972. off a shell process.
  5973.  
  5974. * Module rfc822 now supports accessing the header fields using the
  5975. mapping/dictionary interface, e.g. h['subject'].
  5976.  
  5977. * Module pdb now makes it possible to set a break on a function
  5978. (syntax: break <expression>, where <expression> yields a function
  5979. object).
  5980.  
  5981. Changed Demos
  5982. -------------
  5983.  
  5984. * The Demo/scripts/freeze.py script is working again (thanks to Jaap
  5985. Vermeulen).
  5986.  
  5987. New Demos
  5988. ---------
  5989.  
  5990. * Demo/threads/Generator.py is a proposed interface for restartable
  5991. functions a la Tim Peters.
  5992.  
  5993. * Demo/scripts/newslist.py, by Quentin Stafford-Fraser, generates a
  5994. directory full of HTML pages which between them contain links to all
  5995. the newsgroups available on your server.
  5996.  
  5997. * Demo/dns contains a DNS (Domain Name Server) client.
  5998.  
  5999. * Demo/lutz contains miscellaneous demos by Mark Lutz (e.g. psh.py, a
  6000. nice enhanced Python shell!!!).
  6001.  
  6002. * Demo/turing contains a Turing machine by Amrit Prem.
  6003.  
  6004. Documentation
  6005. -------------
  6006.  
  6007. * Documented new language features mentioned above (but not all new
  6008. modules).
  6009.  
  6010. * Added a chapter to the Tutorial describing recent additions to
  6011. Python.
  6012.  
  6013. * Clarified some sentences in the reference manual,
  6014. e.g. break/continue, local/global scope, slice assignment.
  6015.  
  6016. Source Structure
  6017. ----------------
  6018.  
  6019. * Moved Include/tokenizer.h to Parser/tokenizer.h.
  6020.  
  6021. * Added Python/getopt.c for systems that don't have it.
  6022.  
  6023. Emacs mode
  6024. ----------
  6025.  
  6026. * Indentation of continuated lines is done more intelligently;
  6027. consequently the variable py-continuation-offset is gone.
  6028.  
  6029. ========================================
  6030. ==> Release 1.0.1 (15 February 1994) <==
  6031. ========================================
  6032.  
  6033. * Many portability fixes should make it painless to build Python on
  6034. several new platforms, e.g. NeXT, SEQUENT, WATCOM, DOS, and Windows.
  6035.  
  6036. * Fixed test for <stdarg.h> -- this broke on some platforms.
  6037.  
  6038. * Fixed test for shared library dynalic loading -- this broke on SunOS
  6039. 4.x using the GNU loader.
  6040.  
  6041. * Changed order and number of SVR4 networking libraries (it is now
  6042. -lsocket -linet -lnsl, if these libraries exist).
  6043.  
  6044. * Installing the build intermediate stages with "make libainstall" now
  6045. also installs config.c.in, Setup and makesetup, which are used by the
  6046. new Extensions mechanism.
  6047.  
  6048. * Improved README file contains more hints and new troubleshooting
  6049. section.
  6050.  
  6051. * The built-in module strop now defines fast versions of three more
  6052. functions of the standard string module: atoi(), atol() and atof().
  6053. The strop versions of atoi() and atol() support an optional second
  6054. argument to specify the base (default 10).  NOTE: you don't have to
  6055. explicitly import strop to use the faster versions -- the string
  6056. module contains code to let versions from stop override the default
  6057. versions.
  6058.  
  6059. * There is now a working Lib/dospath.py for those who use Python under
  6060. DOS (or Windows).  Thanks, Jaap!
  6061.  
  6062. * There is now a working Modules/dosmodule.c for DOS (or Windows)
  6063. system calls.
  6064.  
  6065. * Lib.os.py has been reorganized (making it ready for more operating
  6066. systems).
  6067.  
  6068. * Lib/ospath.py is now obsolete (use os.path instead).
  6069.  
  6070. * Many fixes to the tutorial to make it match Python 1.0.  Thanks,
  6071. Tim!
  6072.  
  6073. * Fixed Doc/Makefile, Doc/README and various scripts there.
  6074.  
  6075. * Added missing description of fdopen to Doc/libposix.tex.
  6076.  
  6077. * Made cleanup() global, for the benefit of embedded applications.
  6078.  
  6079. * Added parsing of addresses and dates to Lib/rfc822.py.
  6080.  
  6081. * Small fixes to Lib/aifc.py, Lib/sunau.py, Lib/tzparse.py to make
  6082. them usable at all.
  6083.  
  6084. * New module Lib/wave.py reads RIFF (*.wav) audio files.
  6085.  
  6086. * Module Lib/filewin.py moved to Lib/stdwin/filewin.py where it
  6087. belongs.
  6088.  
  6089. * New options and comments for Modules/makesetup (used by new
  6090. Extension mechanism).
  6091.  
  6092. * Misc/HYPE contains text of announcement of 1.0.0 in comp.lang.misc
  6093. and elsewhere.
  6094.  
  6095. * Fixed coredump in filter(None, 'abcdefg').
  6096.  
  6097.  
  6098. =======================================
  6099. ==> Release 1.0.0 (26 January 1994) <==
  6100. =======================================
  6101.  
  6102. As is traditional, so many things have changed that I can't pretend to
  6103. be complete in these release notes, but I'll try anyway :-)
  6104.  
  6105. Note that the very last section is labeled "remaining bugs".
  6106.  
  6107.  
  6108. Source organization and build process
  6109. -------------------------------------
  6110.  
  6111. * The sources have finally been split: instead of a single src
  6112. subdirectory there are now separate directories Include, Parser,
  6113. Grammar, Objects, Python and Modules.  Other directories also start
  6114. with a capital letter: Misc, Doc, Lib, Demo.
  6115.  
  6116. * A few extensions (notably Amoeba and X support) have been moved to a
  6117. separate subtree Extensions, which is no longer in the core
  6118. distribution, but separately ftp'able as extensions.tar.Z.  (The
  6119. distribution contains a placeholder Ext-dummy with a description of
  6120. the Extensions subtree as well as the most recent versions of the
  6121. scripts used there.)
  6122.  
  6123. * A few large specialized demos (SGI video and www) have been
  6124. moved to a separate subdirectory Demo2, which is no longer in the core
  6125. distribution, but separately ftp'able as demo2.tar.Z.
  6126.  
  6127. * Parts of the standard library have been moved to subdirectories:
  6128. there are now standard subdirectories stdwin, test, sgi and sun4.
  6129.  
  6130. * The configuration process has radically changed: I now use GNU
  6131. autoconf.  This makes it much easier to build on new Unix flavors, as
  6132. well as fully supporting VPATH (if your Make has it).  The scripts
  6133. Configure.py and Addmodule.sh are no longer needed.  Many source files
  6134. have been adapted in order to work with the symbols that the configure
  6135. script generated by autoconf defines (or not); the resulting source is
  6136. much more portable to different C compilers and operating systems,
  6137. even non Unix systems (a Mac port was done in an afternoon).  See the
  6138. toplevel README file for a description of the new build process.
  6139.  
  6140. * GNU readline (a slightly newer version) is now a subdirectory of the
  6141. Python toplevel.  It is still not automatically configured (being
  6142. totally autoconf-unaware :-).  One problem has been solved: typing
  6143. Control-C to a readline prompt will now work.  The distribution no
  6144. longer contains a "super-level" directory (above the python toplevel
  6145. directory), and dl, dl-dld and GNU dld are no longer part of the
  6146. Python distribution (you can still ftp them from
  6147. ftp.cwi.nl:/pub/dynload).
  6148.  
  6149. * The DOS functions have been taken out of posixmodule.c and moved
  6150. into a separate file dosmodule.c.
  6151.  
  6152. * There's now a separate file version.c which contains nothing but
  6153. the version number.
  6154.  
  6155. * The actual main program is now contained in config.c (unless NO_MAIN
  6156. is defined); pythonmain.c now contains a function realmain() which is
  6157. called from config.c's main().
  6158.  
  6159. * All files needed to use the built-in module md5 are now contained in
  6160. the distribution.  The module has been cleaned up considerably.
  6161.  
  6162.  
  6163. Documentation
  6164. -------------
  6165.  
  6166. * The library manual has been split into many more small latex files,
  6167. so it is easier to edit Doc/lib.tex file to create a custom library
  6168. manual, describing only those modules supported on your system.  (This
  6169. is not automated though.)
  6170.  
  6171. * A fourth manual has been added, titled "Extending and Embedding the
  6172. Python Interpreter" (Doc/ext.tex), which collects information about
  6173. the interpreter which was previously spread over several files in the
  6174. misc subdirectory.
  6175.  
  6176. * The entire documentation is now also available on-line for those who
  6177. have a WWW browser (e.g. NCSA Mosaic).  Point your browser to the URL
  6178. "http://www.cwi.nl/~guido/Python.html".
  6179.  
  6180.  
  6181. Syntax
  6182. ------
  6183.  
  6184. * Strings may now be enclosed in double quotes as well as in single
  6185. quotes.  There is no difference in interpretation.  The repr() of
  6186. string objects will use double quotes if the string contains a single
  6187. quote and no double quotes.  Thanks to Amrit Prem for these changes!
  6188.  
  6189. * There is a new keyword 'exec'.  This replaces the exec() built-in
  6190. function.  If a function contains an exec statement, local variable
  6191. optimization is not performed for that particular function, thus
  6192. making assignment to local variables in exec statements less
  6193. confusing.  (As a consequence, os.exec and python.exec have been
  6194. renamed to execv.)
  6195.  
  6196. * There is a new keyword 'lambda'.  An expression of the form
  6197.  
  6198.     lambda <parameters> : <expression>
  6199.  
  6200. yields an anonymous function.  This is really only syntactic sugar;
  6201. you can just as well define a local function using
  6202.  
  6203.     def some_temporary_name(<parameters>): return <expression>
  6204.  
  6205. Lambda expressions are particularly useful in combination with map(),
  6206. filter() and reduce(), described below.  Thanks to Amrit Prem for
  6207. submitting this code (as well as map(), filter(), reduce() and
  6208. xrange())!
  6209.  
  6210.  
  6211. Built-in functions
  6212. ------------------
  6213.  
  6214. * The built-in module containing the built-in functions is called
  6215. __builtin__ instead of builtin.
  6216.  
  6217. * New built-in functions map(), filter() and reduce() perform standard
  6218. functional programming operations (though not lazily):
  6219.  
  6220. - map(f, seq) returns a new sequence whose items are the items from
  6221. seq with f() applied to them.
  6222.  
  6223. - filter(f, seq) returns a subsequence of seq consisting of those
  6224. items for which f() is true.
  6225.  
  6226. - reduce(f, seq, initial) returns a value computed as follows:
  6227.     acc = initial
  6228.     for item in seq: acc = f(acc, item)
  6229.     return acc
  6230.  
  6231. * New function xrange() creates a "range object".  Its arguments are
  6232. the same as those of range(), and when used in a for loop a range
  6233. objects also behaves identical.  The advantage of xrange() over
  6234. range() is that its representation (if the range contains many
  6235. elements) is much more compact than that of range().  The disadvantage
  6236. is that the result cannot be used to initialize a list object or for
  6237. the "Python idiom" [RED, GREEN, BLUE] = range(3).  On some modern
  6238. architectures, benchmarks have shown that "for i in range(...): ..."
  6239. actually executes *faster* than "for i in xrange(...): ...", but on
  6240. memory starved machines like PCs running DOS range(100000) may be just
  6241. too big to be represented at all...
  6242.  
  6243. * Built-in function exec() has been replaced by the exec statement --
  6244. see above.
  6245.  
  6246.  
  6247. The interpreter
  6248. ---------------
  6249.  
  6250. * Syntax errors are now not printed to stderr by the parser, but
  6251. rather the offending line and other relevant information are packed up
  6252. in the SyntaxError exception argument.  When the main loop catches a
  6253. SyntaxError exception it will print the error in the same format as
  6254. previously, but at the proper position in the stack traceback.
  6255.  
  6256. * You can now set a maximum to the number of traceback entries
  6257. printed by assigning to sys.tracebacklimit.  The default is 1000.
  6258.  
  6259. * The version number in .pyc files has changed yet again.
  6260.  
  6261. * It is now possible to have a .pyc file without a corresponding .py
  6262. file.  (Warning: this may break existing installations if you have an
  6263. old .pyc file lingering around somewhere on your module search path
  6264. without a corresponding .py file, when there is a .py file for a
  6265. module of the same name further down the path -- the new interpreter
  6266. will find the first .pyc file and complain about it, while the old
  6267. interpreter would ignore it and use the .py file further down.)
  6268.  
  6269. * The list sys.builtin_module_names is now sorted and also contains
  6270. the names of a few hardwired built-in modules (sys, __main__ and
  6271. __builtin__).
  6272.  
  6273. * A module can now find its own name by accessing the global variable
  6274. __name__.  Assigning to this variable essentially renames the module
  6275. (it should also be stored under a different key in sys.modules).
  6276. A neat hack follows from this: a module that wants to execute a main
  6277. program when called as a script no longer needs to compare
  6278. sys.argv[0]; it can simply do "if __name__ == '__main__': main()".
  6279.  
  6280. * When an object is printed by the print statement, its implementation
  6281. of str() is used.  This means that classes can define __str__(self) to
  6282. direct how their instances are printed.  This is different from
  6283. __repr__(self), which should define an unambigous string
  6284. representation of the instance.  (If __str__() is not defined, it
  6285. defaults to __repr__().)
  6286.  
  6287. * Functions and code objects can now be compared meaningfully.
  6288.  
  6289. * On systems supporting SunOS or SVR4 style shared libraries, dynamic
  6290. loading of modules using shared libraries is automatically configured.
  6291. Thanks to Bill Jansen and Denis Severson for contributing this change!
  6292.  
  6293.  
  6294. Built-in objects
  6295. ----------------
  6296.  
  6297. * File objects have acquired a new method writelines() which is the
  6298. reverse of readlines().  (It does not actually write lines, just a
  6299. list of strings, but the symmetry makes the choice of name OK.)
  6300.  
  6301.  
  6302. Built-in modules
  6303. ----------------
  6304.  
  6305. * Socket objects no longer support the avail() method.  Use the select
  6306. module instead, or use this function to replace it:
  6307.  
  6308.     def avail(f):
  6309.         import select
  6310.         return f in select.select([f], [], [], 0)[0]
  6311.  
  6312. * Initialization of stdwin is done differently.  It actually modifies
  6313. sys.argv (taking out the options the X version of stdwin recognizes)
  6314. the first time it is imported.
  6315.  
  6316. * A new built-in module parser provides a rudimentary interface to the
  6317. python parser.  Corresponding standard library modules token and symbol
  6318. defines the numeric values of tokens and non-terminal symbols.
  6319.  
  6320. * The posix module has aquired new functions setuid(), setgid(),
  6321. execve(), and exec() has been renamed to execv().
  6322.  
  6323. * The array module is extended with 8-byte object swaps, the 'i'
  6324. format character, and a reverse() method.  The read() and write()
  6325. methods are renamed to fromfile() and tofile().
  6326.  
  6327. * The rotor module has freed of portability bugs.  This introduces a
  6328. backward compatibility problem: strings encoded with the old rotor
  6329. module can't be decoded by the new version.
  6330.  
  6331. * For select.select(), a timeout (4th) argument of None means the same
  6332. as leaving the timeout argument out.
  6333.  
  6334. * Module strop (and hence standard library module string) has aquired
  6335. a new function: rindex().  Thanks to Amrit Prem!
  6336.  
  6337. * Module regex defines a new function symcomp() which uses an extended
  6338. regular expression syntax: parenthesized subexpressions may be labeled
  6339. using the form "\(<labelname>...\)", and the group() method can return
  6340. sub-expressions by name.  Thanks to Tracy Tims for these changes!
  6341.  
  6342. * Multiple threads are now supported on Solaris 2.  Thanks to Sjoerd
  6343. Mullender!
  6344.  
  6345.  
  6346. Standard library modules
  6347. ------------------------
  6348.  
  6349. * The library is now split in several subdirectories: all stuff using
  6350. stdwin is in Lib/stdwin, all SGI specific (or SGI Indigo or GL) stuff
  6351. is in Lib/sgi, all Sun Sparc specific stuff is in Lib/sun4, and all
  6352. test modules are in Lib/test.  The default module search path will
  6353. include all relevant subdirectories by default.
  6354.  
  6355. * Module os now knows about trying to import dos.  It defines
  6356. functions execl(), execle(), execlp() and execvp().
  6357.  
  6358. * New module dospath (should be attacked by a DOS hacker though).
  6359.  
  6360. * All modules defining classes now define __init__() constructors
  6361. instead of init() methods.  THIS IS AN INCOMPATIBLE CHANGE!
  6362.  
  6363. * Some minor changes and bugfixes module ftplib (mostly Steve
  6364. Majewski's suggestions); the debug() method is renamed to
  6365. set_debuglevel().
  6366.  
  6367. * Some new test modules (not run automatically by testall though):
  6368. test_audioop, test_md5, test_rgbimg, test_select.
  6369.  
  6370. * Module string now defines rindex() and rfind() in analogy of index()
  6371. and find().  It also defines atof() and atol() (and corresponding
  6372. exceptions) in analogy to atoi().
  6373.  
  6374. * Added help() functions to modules profile and pdb.
  6375.  
  6376. * The wdb debugger (now in Lib/stdwin) now shows class or instance
  6377. variables on a double click.  Thanks to Sjoerd Mullender!
  6378.  
  6379. * The (undocumented) module lambda has gone -- you couldn't import it
  6380. any more, and it was basically more a demo than a library module...
  6381.  
  6382.  
  6383. Multimedia extensions
  6384. ---------------------
  6385.  
  6386. * The optional built-in modules audioop and imageop are now standard
  6387. parts of the interpreter.  Thanks to Sjoerd Mullender and Jack Jansen
  6388. for contributing this code!
  6389.  
  6390. * There's a new operation in audioop: minmax().
  6391.  
  6392. * There's a new built-in module called rgbimg which supports portable
  6393. efficient reading of SGI RCG image files.  Thanks also to Paul
  6394. Haeberli for the original code!  (Who will contribute a GIF reader?)
  6395.  
  6396. * The module aifc is gone -- you should now always use aifc, which has
  6397. received a facelift.
  6398.  
  6399. * There's a new module sunau., for reading Sun (and NeXT) audio files.
  6400.  
  6401. * There's a new module audiodev which provides a uniform interface to
  6402. (SGI Indigo and Sun Sparc) audio hardware.
  6403.  
  6404. * There's a new module sndhdr which recognizes various sound files by
  6405. looking in their header and checking for various magic words.
  6406.  
  6407.  
  6408. Optimizations
  6409. -------------
  6410.  
  6411. * Most optimizations below can be configured by compile-time flags.
  6412. Thanks to Sjoerd Mullender for submitting these optimizations!
  6413.  
  6414. * Small integers (default -1..99) are shared -- i.e. if two different
  6415. functions compute the same value it is possible (but not
  6416. guaranteed!!!) that they return the same *object*.  Python programs
  6417. can detect this but should *never* rely on it.
  6418.  
  6419. * Empty tuples (which all compare equal) are shared in the same
  6420. manner.
  6421.  
  6422. * Tuples of size up to 20 (default) are put in separate free lists
  6423. when deallocated.
  6424.  
  6425. * There is a compile-time option to cache a string's hash function,
  6426. but this appeared to have a negligeable effect, and as it costs 4
  6427. bytes per string it is disabled by default.
  6428.  
  6429.  
  6430. Embedding Python
  6431. ----------------
  6432.  
  6433. * The initialization interface has been simplified somewhat.  You now
  6434. only call "initall()" to initialize the interpreter.
  6435.  
  6436. * The previously announced renaming of externally visible identifiers
  6437. has not been carried out.  It will happen in a later release.  Sorry.
  6438.  
  6439.  
  6440. Miscellaneous bugs that have been fixed
  6441. ---------------------------------------
  6442.  
  6443. * All known portability bugs.
  6444.  
  6445. * Version 0.9.9 dumped core in <listobject>.sort() which has been
  6446. fixed.  Thanks to Jaap Vermeulen for fixing this and posting the fix
  6447. on the mailing list while I was away!
  6448.  
  6449. * Core dump on a format string ending in '%', e.g. in the expression
  6450. '%' % None.
  6451.  
  6452. * The array module yielded a bogus result for concatenation (a+b would
  6453. yield a+a).
  6454.  
  6455. * Some serious memory leaks in strop.split() and strop.splitfields().
  6456.  
  6457. * Several problems with the nis module.
  6458.  
  6459. * Subtle problem when copying a class method from another class
  6460. through assignment (the method could not be called).
  6461.  
  6462.  
  6463. Remaining bugs
  6464. --------------
  6465.  
  6466. * One problem with 64-bit machines remains -- since .pyc files are
  6467. portable and use only 4 bytes to represent an integer object, 64-bit
  6468. integer literals are silently truncated when written into a .pyc file.
  6469. Work-around: use eval('123456789101112').
  6470.  
  6471. * The freeze script doesn't work any more.  A new and more portable
  6472. one can probably be cooked up using tricks from Extensions/mkext.py.
  6473.  
  6474. * The dos support hasn't been tested yet.  (Really Soon Now we should
  6475. have a PC with a working C compiler!)
  6476.  
  6477.  
  6478. ===================================
  6479. ==> Release 0.9.9 (29 Jul 1993) <==
  6480. ===================================
  6481.  
  6482. I *believe* these are the main user-visible changes in this release,
  6483. but there may be others.  SGI users may scan the {src,lib}/ChangeLog
  6484. files for improvements of some SGI specific modules, e.g. aifc and
  6485. cl.  Developers of extension modules should also read src/ChangeLog.
  6486.  
  6487.  
  6488. Naming of C symbols used by the Python interpreter
  6489. --------------------------------------------------
  6490.  
  6491. * This is the last release using the current naming conventions.  New
  6492. naming conventions are explained in the file misc/NAMING.
  6493. Summarizing, all externally visible symbols get (at least) a "Py"
  6494. prefix, and most functions are renamed to the standard form
  6495. PyModule_FunctionName.
  6496.  
  6497. * Writers of extensions are urged to start using the new naming
  6498. conventions.  The next release will use the new naming conventions
  6499. throughout (it will also have a different source directory
  6500. structure).
  6501.  
  6502. * As a result of the preliminary work for the great renaming, many
  6503. functions that were accidentally global have been made static.
  6504.  
  6505.  
  6506. BETA X11 support
  6507. ----------------
  6508.  
  6509. * There are now modules interfacing to the X11 Toolkit Intrinsics, the
  6510. Athena widgets, and the Motif 1.1 widget set.  These are not yet
  6511. documented except through the examples and README file in the demo/x11
  6512. directory.  It is expected that this interface will be replaced by a
  6513. more powerful and correct one in the future, which may or may not be
  6514. backward compatible.  In other words, this part of the code is at most
  6515. BETA level software!  (Note: the rest of Python is rock solid as ever!)
  6516.  
  6517. * I understand that the above may be a bit of a disappointment,
  6518. however my current schedule does not allow me to change this situation
  6519. before putting the release out of the door.  By releasing it
  6520. undocumented and buggy, at least some of the (working!) demo programs,
  6521. like itr (my Internet Talk Radio browser) become available to a larger
  6522. audience.
  6523.  
  6524. * There are also modules interfacing to SGI's "Glx" widget (a GL
  6525. window wrapped in a widget) and to NCSA's "HTML" widget (which can
  6526. format HyperText Markup Language, the document format used by the
  6527. World Wide Web).
  6528.  
  6529. * I've experienced some problems when building the X11 support.  In
  6530. particular, the Xm and Xaw widget sets don't go together, and it
  6531. appears that using X11R5 is better than using X11R4.  Also the threads
  6532. module and its link time options may spoil things.  My own strategy is
  6533. to build two Python binaries: one for use with X11 and one without
  6534. it, which can contain a richer set of built-in modules.  Don't even
  6535. *think* of loading the X11 modules dynamically...
  6536.  
  6537.  
  6538. Environmental changes
  6539. ---------------------
  6540.  
  6541. * Compiled files (*.pyc files) created by this Python version are
  6542. incompatible with those created by the previous version.  Both
  6543. versions detect this and silently create a correct version, but it
  6544. means that it is not a good idea to use the same library directory for
  6545. an old and a new interpreter, since they will start to "fight" over
  6546. the *.pyc files...
  6547.  
  6548. * When a stack trace is printed, the exception is printed last instead
  6549. of first.  This means that if the beginning of the stack trace
  6550. scrolled out of your window you can still see what exception caused
  6551. it.
  6552.  
  6553. * Sometimes interrupting a Python operation does not work because it
  6554. hangs in a blocking system call.  You can now kill the interpreter by
  6555. interrupting it three times.  The second time you interrupt it, a
  6556. message will be printed telling you that the third interrupt will kill
  6557. the interpreter.  The "sys.exitfunc" feature still makes limited
  6558. clean-up possible in this case.
  6559.  
  6560.  
  6561. Changes to the command line interface
  6562. -------------------------------------
  6563.  
  6564. * The python usage message is now much more informative.
  6565.  
  6566. * New option -i enters interactive mode after executing a script --
  6567. useful for debugging.
  6568.  
  6569. * New option -k raises an exception when an expression statement
  6570. yields a value other than None.
  6571.  
  6572. * For each option there is now also a corresponding environment
  6573. variable.
  6574.  
  6575.  
  6576. Using Python as an embedded language
  6577. ------------------------------------
  6578.  
  6579. * The distribution now contains (some) documentation on the use of
  6580. Python as an "embedded language" in other applications, as well as a
  6581. simple example.  See the file misc/EMBEDDING and the directory embed/.
  6582.  
  6583.  
  6584. Speed improvements
  6585. ------------------
  6586.  
  6587. * Function local variables are now generally stored in an array and
  6588. accessed using an integer indexing operation, instead of through a
  6589. dictionary lookup.  (This compensates the somewhat slower dictionary
  6590. lookup caused by the generalization of the dictionary module.)
  6591.  
  6592.  
  6593. Changes to the syntax
  6594. ---------------------
  6595.  
  6596. * Continuation lines can now *sometimes* be written without a
  6597. backslash: if the continuation is contained within nesting (), [] or
  6598. {} brackets the \ may be omitted.  There's a much improved
  6599. python-mode.el in the misc directory which knows about this as well.
  6600.  
  6601. * You can no longer use an empty set of parentheses to define a class
  6602. without base classes.  That is, you no longer write this:
  6603.  
  6604.     class Foo(): # syntax error
  6605.         ...
  6606.  
  6607. You must write this instead:
  6608.  
  6609.     class Foo:
  6610.         ...
  6611.  
  6612. This was already the preferred syntax in release 0.9.8 but many
  6613. people seemed not to have picked it up.  There's a Python script that
  6614. fixes old code: demo/scripts/classfix.py.
  6615.  
  6616. * There's a new reserved word: "access".  The syntax and semantics are
  6617. still subject of of research and debate (as well as undocumented), but
  6618. the parser knows about the keyword so you must not use it as a
  6619. variable, function, or attribute name.
  6620.  
  6621.  
  6622. Changes to the semantics of the language proper
  6623. -----------------------------------------------
  6624.  
  6625. * The following compatibility hack is removed: if a function was
  6626. defined with two or more arguments, and called with a single argument
  6627. that was a tuple with just as many arguments, the items of this tuple
  6628. would be used as the arguments.  This is no longer supported.
  6629.  
  6630.  
  6631. Changes to the semantics of classes and instances
  6632. -------------------------------------------------
  6633.  
  6634. * Class variables are now also accessible as instance variables for
  6635. reading (assignment creates an instance variable which overrides the
  6636. class variable of the same name though).
  6637.  
  6638. * If a class attribute is a user-defined function, a new kind of
  6639. object is returned: an "unbound method".  This contains a pointer to
  6640. the class and can only be called with a first argument which is a
  6641. member of that class (or a derived class).
  6642.  
  6643. * If a class defines a method __init__(self, arg1, ...) then this
  6644. method is called when a class instance is created by the classname()
  6645. construct.  Arguments passed to classname() are passed to the
  6646. __init__() method.  The __init__() methods of base classes are not
  6647. automatically called; the derived __init__() method must call these if
  6648. necessary (this was done so the derived __init__() method can choose
  6649. the call order and arguments for the base __init__() methods).
  6650.  
  6651. * If a class defines a method __del__(self) then this method is called
  6652. when an instance of the class is about to be destroyed.  This makes it
  6653. possible to implement clean-up of external resources attached to the
  6654. instance.  As with __init__(), the __del__() methods of base classes
  6655. are not automatically called.  If __del__ manages to store a reference
  6656. to the object somewhere, its destruction is postponed; when the object
  6657. is again about to be destroyed its __del__() method will be called
  6658. again.
  6659.  
  6660. * Classes may define a method __hash__(self) to allow their instances
  6661. to be used as dictionary keys.  This must return a 32-bit integer.
  6662.  
  6663.  
  6664. Minor improvements
  6665. ------------------
  6666.  
  6667. * Function and class objects now know their name (the name given in
  6668. the 'def' or 'class' statement that created them).
  6669.  
  6670. * Class instances now know their class name.
  6671.  
  6672.  
  6673. Additions to built-in operations
  6674. --------------------------------
  6675.  
  6676. * The % operator with a string left argument implements formatting
  6677. similar to sprintf() in C.  The right argument is either a single
  6678. value or a tuple of values.  All features of Standard C sprintf() are
  6679. supported except %p.
  6680.  
  6681. * Dictionaries now support almost any key type, instead of just
  6682. strings.  (The key type must be an immutable type or must be a class
  6683. instance where the class defines a method __hash__(), in order to
  6684. avoid losing track of keys whose value may change.)
  6685.  
  6686. * Built-in methods are now compared properly: when comparing x.meth1
  6687. and y.meth2, if x is equal to y and the methods are defined by the
  6688. same function, x.meth1 compares equal to y.meth2.
  6689.  
  6690.  
  6691. Additions to built-in functions
  6692. -------------------------------
  6693.  
  6694. * str(x) returns a string version of its argument.  If the argument is
  6695. a string it is returned unchanged, otherwise it returns `x`.
  6696.  
  6697. * repr(x) returns the same as `x`.  (Some users found it easier to
  6698. have this as a function.)
  6699.  
  6700. * round(x) returns the floating point number x rounded to an whole
  6701. number, represented as a floating point number.  round(x, n) returns x
  6702. rounded to n digits.
  6703.  
  6704. * hasattr(x, name) returns true when x has an attribute with the given
  6705. name.
  6706.  
  6707. * hash(x) returns a hash code (32-bit integer) of an arbitrary
  6708. immutable object's value.
  6709.  
  6710. * id(x) returns a unique identifier (32-bit integer) of an arbitrary
  6711. object.
  6712.  
  6713. * compile() compiles a string to a Python code object.
  6714.  
  6715. * exec() and eval() now support execution of code objects.
  6716.  
  6717.  
  6718. Changes to the documented part of the library (standard modules)
  6719. ----------------------------------------------------------------
  6720.  
  6721. * os.path.normpath() (a.k.a. posixpath.normpath()) has been fixed so
  6722. the border case '/foo/..' returns '/' instead of ''.
  6723.  
  6724. * A new function string.find() is added with similar semantics to
  6725. string.index(); however when it does not find the given substring it
  6726. returns -1 instead of raising string.index_error.
  6727.  
  6728.  
  6729. Changes to built-in modules
  6730. ---------------------------
  6731.  
  6732. * New optional module 'array' implements operations on sequences of
  6733. integers or floating point numbers of a particular size.  This is
  6734. useful to manipulate large numerical arrays or to read and write
  6735. binary files consisting of numerical data.
  6736.  
  6737. * Regular expression objects created by module regex now support a new
  6738. method named group(), which returns one or more \(...\) groups by number.
  6739. The number of groups is increased from 10 to 100.
  6740.  
  6741. * Function compile() in module regex now supports an optional mapping
  6742. argument; a variable casefold is added to the module which can be used
  6743. as a standard uppercase to lowercase mapping.
  6744.  
  6745. * Module time now supports many routines that are defined in the
  6746. Standard C time interface (<time.h>): gmtime(), localtime(),
  6747. asctime(), ctime(), mktime(), as well as these variables (taken from
  6748. System V): timezone, altzone, daylight and tzname.  (The corresponding
  6749. functions in the undocumented module calendar have been removed; the
  6750. undocumented and unfinished module tzparse is now obsolete and will
  6751. disappear in a future release.)
  6752.  
  6753. * Module strop (the fast built-in version of standard module string)
  6754. now uses C's definition of whitespace instead of fixing it to space,
  6755. tab and newline; in practice this usually means that vertical tab,
  6756. form feed and return are now also considered whitespace.  It exports
  6757. the string of characters that are considered whitespace as well as the
  6758. characters that are considered lowercase or uppercase.
  6759.  
  6760. * Module sys now defines the variable builtin_module_names, a list of
  6761. names of modules built into the current interpreter (including not
  6762. yet imported, but excluding two special modules that always have to be
  6763. defined -- sys and builtin).
  6764.  
  6765. * Objects created by module sunaudiodev now also support flush() and
  6766. close() methods.
  6767.  
  6768. * Socket objects created by module socket now support an optional
  6769. flags argument for their methods sendto() and recvfrom().
  6770.  
  6771. * Module marshal now supports dumping to and loading from strings,
  6772. through the functions dumps() and loads().
  6773.  
  6774. * Module stdwin now supports some new functionality.  You may have to
  6775. ftp the latest version: ftp.cwi.nl:/pub/stdwin/stdwinforviews.tar.Z.)
  6776.  
  6777.  
  6778. Bugs fixed
  6779. ----------
  6780.  
  6781. * Fixed comparison of negative long integers.
  6782.  
  6783. * The tokenizer no longer botches input lines longer than BUFSIZ.
  6784.  
  6785. * Fixed several severe memory leaks in module select.
  6786.  
  6787. * Fixed memory leaks in modules socket and sv.
  6788.  
  6789. * Fixed memory leak in divmod() for long integers.
  6790.  
  6791. * Problems with definition of floatsleep() on Suns fixed.
  6792.  
  6793. * Many portability bugs fixed (and undoubtedly new ones added :-).
  6794.  
  6795.  
  6796. Changes to the build procedure
  6797. ------------------------------
  6798.  
  6799. * The Makefile supports some new targets: "make default" and "make
  6800. all".  Both are by normally equivalent to "make python".
  6801.  
  6802. * The Makefile no longer uses $> since it's not supported by all
  6803. versions of Make.
  6804.  
  6805. * The header files now all contain #ifdef constructs designed to make
  6806. it safe to include the same header file twice, as well as support for
  6807. inclusion from C++ programs (automatic extern "C" { ... } added).
  6808.  
  6809.  
  6810. Freezing Python scripts
  6811. -----------------------
  6812.  
  6813. * There is now some support for "freezing" a Python script as a
  6814. stand-alone executable binary file.  See the script
  6815. demo/scripts/freeze.py.  It will require some site-specific tailoring
  6816. of the script to get this working, but is quite worthwhile if you write
  6817. Python code for other who may not have built and installed Python.
  6818.  
  6819.  
  6820. MS-DOS
  6821. ------
  6822.  
  6823. * A new MS-DOS port has been done, using MSC 6.0 (I believe).  Thanks,
  6824. Marcel van der Peijl!  This requires fewer compatibility hacks in
  6825. posixmodule.c.  The executable is not yet available but will be soon
  6826. (check the mailing list).
  6827.  
  6828. * The default PYTHONPATH has changed.
  6829.  
  6830.  
  6831. Changes for developers of extension modules
  6832. -------------------------------------------
  6833.  
  6834. * Read src/ChangeLog for full details.
  6835.  
  6836.  
  6837. SGI specific changes
  6838. --------------------
  6839.  
  6840. * Read src/ChangeLog for full details.
  6841.  
  6842.  
  6843. ==================================
  6844. ==> Release 0.9.8 (9 Jan 1993) <==
  6845. ==================================
  6846.  
  6847. I claim no completeness here, but I've tried my best to scan the log
  6848. files throughout my source tree for interesting bits of news.  A more
  6849. complete account of the changes is to be found in the various
  6850. ChangeLog files. See also "News for release 0.9.7beta" below if you're
  6851. still using release 0.9.6, and the file HISTORY if you have an even
  6852. older release.
  6853.  
  6854.     --Guido
  6855.  
  6856.  
  6857. Changes to the language proper
  6858. ------------------------------
  6859.  
  6860. There's only one big change: the conformance checking for function
  6861. argument lists (of user-defined functions only) is stricter.  Earlier,
  6862. you could get away with the following:
  6863.  
  6864.     (a) define a function of one argument and call it with any
  6865.         number of arguments; if the actual argument count wasn't
  6866.         one, the function would receive a tuple containing the
  6867.         arguments arguments (an empty tuple if there were none).
  6868.  
  6869.     (b) define a function of two arguments, and call it with more
  6870.         than two arguments; if there were more than two arguments,
  6871.         the second argument would be passed as a tuple containing
  6872.         the second and further actual arguments.
  6873.  
  6874. (Note that an argument (formal or actual) that is a tuple is counted as
  6875. one; these rules don't apply inside such tuples, only at the top level
  6876. of the argument list.)
  6877.  
  6878. Case (a) was needed to accommodate variable-length argument lists;
  6879. there is now an explicit "varargs" feature (precede the last argument
  6880. with a '*').  Case (b) was needed for compatibility with old class
  6881. definitions: up to release 0.9.4 a method with more than one argument
  6882. had to be declared as "def meth(self, (arg1, arg2, ...)): ...".
  6883. Version 0.9.6 provide better ways to handle both casees, bot provided
  6884. backward compatibility; version 0.9.8 retracts the compatibility hacks
  6885. since they also cause confusing behavior if a function is called with
  6886. the wrong number of arguments.
  6887.  
  6888. There's a script that helps converting classes that still rely on (b),
  6889. provided their methods' first argument is called "self":
  6890. demo/scripts/methfix.py.
  6891.  
  6892. If this change breaks lots of code you have developed locally, try
  6893. #defining COMPAT_HACKS in ceval.c.
  6894.  
  6895. (There's a third compatibility hack, which is the reverse of (a): if a
  6896. function is defined with two or more arguments, and called with a
  6897. single argument that is a tuple with just as many arguments, the items
  6898. of this tuple will be used as the arguments.  Although this can (and
  6899. should!) be done using the built-in function apply() instead, it isn't
  6900. withdrawn yet.)
  6901.  
  6902.  
  6903. One minor change: comparing instance methods works like expected, so
  6904. that if x is an instance of a user-defined class and has a method m,
  6905. then (x.m==x.m) yields 1.
  6906.  
  6907.  
  6908. The following was already present in 0.9.7beta, but not explicitly
  6909. mentioned in the NEWS file: user-defined classes can now define types
  6910. that behave in almost allrespects like numbers.  See
  6911. demo/classes/Rat.py for a simple example.
  6912.  
  6913.  
  6914. Changes to the build process
  6915. ----------------------------
  6916.  
  6917. The Configure.py script and the Makefile has been made somewhat more
  6918. bullet-proof, after reports of (minor) trouble on certain platforms.
  6919.  
  6920. There is now a script to patch Makefile and config.c to add a new
  6921. optional built-in module: Addmodule.sh.  Read the script before using!
  6922.  
  6923. Useing Addmodule.sh, all optional modules can now be configured at
  6924. compile time using Configure.py, so there are no modules left that
  6925. require dynamic loading.
  6926.  
  6927. The Makefile has been fixed to make it easier to use with the VPATH
  6928. feature of some Make versions (e.g. SunOS).
  6929.  
  6930.  
  6931. Changes affecting portability
  6932. -----------------------------
  6933.  
  6934. Several minor portability problems have been solved, e.g. "malloc.h"
  6935. has been renamed to "mymalloc.h", "strdup.c" is no longer used, and
  6936. the system now tolerates malloc(0) returning 0.
  6937.  
  6938. For dynamic loading on the SGI, Jack Jansen's dl 1.6 is now
  6939. distributed with Python.  This solves several minor problems, in
  6940. particular scripts invoked using #! can now use dynamic loading.
  6941.  
  6942.  
  6943. Changes to the interpreter interface
  6944. ------------------------------------
  6945.  
  6946. On popular demand, there's finally a "profile" feature for interactive
  6947. use of the interpreter.  If the environment variable $PYTHONSTARTUP is
  6948. set to the name of an existing file, Python statements in this file
  6949. are executed when the interpreter is started in interactive mode.
  6950.  
  6951. There is a new clean-up mechanism, complementing try...finally: if you
  6952. assign a function object to sys.exitfunc, it will be called when
  6953. Python exits or receives a SIGTERM or SIGHUP signal.
  6954.  
  6955. The interpreter is now generally assumed to live in
  6956. /usr/local/bin/python (as opposed to /usr/local/python).  The script
  6957. demo/scripts/fixps.py will update old scripts in place (you can easily
  6958. modify it to do other similar changes).
  6959.  
  6960. Most I/O that uses sys.stdin/stdout/stderr will now use any object
  6961. assigned to those names as long as the object supports readline() or
  6962. write() methods.
  6963.  
  6964. The parser stack has been increased to 500 to accommodate more
  6965. complicated expressions (7 levels used to be the practical maximum,
  6966. it's now about 38).
  6967.  
  6968. The limit on the size of the *run-time* stack has completely been
  6969. removed -- this means that tuple or list displays can contain any
  6970. number of elements (formerly more than 50 would crash the
  6971. interpreter). 
  6972.  
  6973.  
  6974. Changes to existing built-in functions and methods
  6975. --------------------------------------------------
  6976.  
  6977. The built-in functions int(), long(), float(), oct() and hex() now
  6978. also apply to class instalces that define corresponding methods
  6979. (__int__ etc.).
  6980.  
  6981.  
  6982. New built-in functions
  6983. ----------------------
  6984.  
  6985. The new functions str() and repr() convert any object to a string.
  6986. The function repr(x) is in all respects equivalent to `x` -- some
  6987. people prefer a function for this.  The function str(x) does the same
  6988. except if x is already a string -- then it returns x unchanged
  6989. (repr(x) adds quotes and escapes "funny" characters as octal escapes).
  6990.  
  6991. The new function cmp(x, y) returns -1 if x<y, 0 if x==y, 1 if x>y.
  6992.  
  6993.  
  6994. Changes to general built-in modules
  6995. -----------------------------------
  6996.  
  6997. The time module's functions are more general: time() returns a
  6998. floating point number and sleep() accepts one.  Their accuracies
  6999. depends on the precision of the system clock.  Millisleep is no longer
  7000. needed (although it still exists for now), but millitimer is still
  7001. needed since on some systems wall clock time is only available with
  7002. seconds precision, while a source of more precise time exists that
  7003. isn't synchronized with the wall clock.  (On UNIX systems that support
  7004. the BSD gettimeofday() function, time.time() is as time.millitimer().)
  7005.  
  7006. The string representation of a file object now includes an address:
  7007. '<file 'filename', mode 'r' at #######>' where ###### is a hex number
  7008. (the object's address) to make it unique.
  7009.  
  7010. New functions added to posix: nice(), setpgrp(), and if your system
  7011. supports them: setsid(), setpgid(), tcgetpgrp(), tcsetpgrp().
  7012.  
  7013. Improvements to the socket module: socket objects have new methods
  7014. getpeername() and getsockname(), and the {get,set}sockopt methods can
  7015. now get/set any kind of option using strings built with the new struct
  7016. module.  And there's a new function fromfd() which creates a socket
  7017. object given a file descriptor (useful for servers started by inetd,
  7018. which have a socket connected to stdin and stdout).
  7019.  
  7020.  
  7021. Changes to SGI-specific built-in modules
  7022. ----------------------------------------
  7023.  
  7024. The FORMS library interface (fl) now requires FORMS 2.1a.  Some new
  7025. functions have been added and some bugs have been fixed.
  7026.  
  7027. Additions to al (audio library interface): added getname(),
  7028. getdefault() and getminmax().
  7029.  
  7030. The gl modules doesn't call "foreground()" when initialized (this
  7031. caused some problems) like it dit in 0.9.7beta (but not before).
  7032. There's a new gl function 'gversion() which returns a version string.
  7033.  
  7034. The interface to sv (Indigo video interface) has totally changed.
  7035. (Sorry, still no documentation, but see the examples in
  7036. demo/sgi/{sv,video}.)
  7037.  
  7038.  
  7039. Changes to standard library modules
  7040. -----------------------------------
  7041.  
  7042. Most functions in module string are now much faster: they're actually
  7043. implemented in C.  The module containing the C versions is called
  7044. "strop" but you should still import "string" since strop doesn't
  7045. provide all the interfaces defined in string (and strop may be renamed
  7046. to string when it is complete in a future release).
  7047.  
  7048. string.index() now accepts an optional third argument giving an index
  7049. where to start searching in the first argument, so you can find second
  7050. and further occurrences (this is similar to the regular expression
  7051. functions in regex).
  7052.  
  7053. The definition of what string.splitfields(anything, '') should return
  7054. is changed for the last time: it returns a singleton list containing
  7055. its whole first argument unchanged.  This is compatible with
  7056. regsub.split() which also ignores empty delimiter matches.
  7057.  
  7058. posixpath, macpath: added dirname() and normpath() (and basename() to
  7059. macpath).
  7060.  
  7061. The mainloop module (for use with stdwin) can now demultiplex input
  7062. from other sources, as long as they can be polled with select().
  7063.  
  7064.  
  7065. New built-in modules
  7066. --------------------
  7067.  
  7068. Module struct defines functions to pack/unpack values to/from strings
  7069. representing binary values in native byte order.
  7070.  
  7071. Module strop implements C versions of many functions from string (see
  7072. above).
  7073.  
  7074. Optional module fcntl defines interfaces to fcntl() and ioctl() --
  7075. UNIX only.  (Not yet properly documented -- see however src/fcntl.doc.)
  7076.  
  7077. Optional module mpz defines an interface to an altaernative long
  7078. integer implementation, the GNU MPZ library.
  7079.  
  7080. Optional module md5 uses the GNU MPZ library to calculate MD5
  7081. signatures of strings.
  7082.  
  7083. There are also optional new modules specific to SGI machines: imageop
  7084. defines some simple operations to images represented as strings; sv
  7085. interfaces to the Indigo video board; cl interfaces to the (yet
  7086. unreleased) compression library.
  7087.  
  7088.  
  7089. New standard library modules
  7090. ----------------------------
  7091.  
  7092. (Unfortunately the following modules are not all documented; read the
  7093. sources to find out more about them!)
  7094.  
  7095. autotest: run testall without showing any output unless it differs
  7096. from the expected output
  7097.  
  7098. bisect: use bisection to insert or find an item in a sorted list
  7099.  
  7100. colorsys: defines conversions between various color systems (e.g. RGB
  7101. <-> YUV)
  7102.  
  7103. nntplib: a client interface to NNTP servers
  7104.  
  7105. pipes: utility to construct pipeline from templates, e.g. for
  7106. conversion from one file format to another using several utilities.
  7107.  
  7108. regsub: contains three functions that are more or less compatible with
  7109. awk functions of the same name: sub() and gsub() do string
  7110. substitution, split() splits a string using a regular expression to
  7111. define how separators are define.
  7112.  
  7113. test_types: test operations on the built-in types of Python
  7114.  
  7115. toaiff: convert various audio file formats to AIFF format
  7116.  
  7117. tzparse: parse the TZ environment parameter (this may be less general
  7118. than it could be, let me know if you fix it).
  7119.  
  7120. (Note that the obsolete module "path" no longer exists.)
  7121.  
  7122.  
  7123. New SGI-specific library modules
  7124. --------------------------------
  7125.  
  7126. CL: constants for use with the built-in compression library interface (cl)
  7127.  
  7128. Queue: a multi-producer, multi-consumer queue class implemented for
  7129. use with the built-in thread module
  7130.  
  7131. SOCKET: constants for use with built-in module socket, e.g. to set/get
  7132. socket options.  This is SGI-specific because the constants to be
  7133. passed are system-dependent.  You can generate a version for your own
  7134. system by running the script demo/scripts/h2py.py with
  7135. /usr/include/sys/socket.h as input.
  7136.  
  7137. cddb: interface to the database used the the CD player
  7138.  
  7139. torgb: convert various image file types to rgb format (requires pbmplus)
  7140.  
  7141.  
  7142. New demos
  7143. ---------
  7144.  
  7145. There's an experimental interface to define Sun RPC clients and
  7146. servers in demo/rpc.
  7147.  
  7148. There's a collection of interfaces to WWW, WAIS and Gopher (both
  7149. Python classes and program providing a user interface) in demo/www.
  7150. This includes a program texi2html.py which converts texinfo files to
  7151. HTML files (the format used hy WWW).
  7152.  
  7153. The ibrowse demo has moved from demo/stdwin/ibrowse to demo/ibrowse.
  7154.  
  7155. For SGI systems, there's a whole collection of programs and classes
  7156. that make use of the Indigo video board in demo/sgi/{sv,video}.  This
  7157. represents a significant amount of work that we're giving away!
  7158.  
  7159. There are demos "rsa" and "md5test" that exercise the mpz and md5
  7160. modules, respectively.  The rsa demo is a complete implementation of
  7161. the RSA public-key cryptosystem!
  7162.  
  7163. A bunch of games and examples submitted by Stoffel Erasmus have been
  7164. included in demo/stoffel.
  7165.  
  7166. There are miscellaneous new files in some existing demo
  7167. subdirectories: classes/bitvec.py, scripts/{fixps,methfix}.py,
  7168. sgi/al/cmpaf.py, sockets/{mcast,gopher}.py.
  7169.  
  7170. There are also many minor changes to existing files, but I'm too lazy
  7171. to run a diff and note the differences -- you can do this yourself if
  7172. you save the old distribution's demos.  One highlight: the
  7173. stdwin/python.py demo is much improved!
  7174.  
  7175.  
  7176. Changes to the documentation
  7177. ----------------------------
  7178.  
  7179. The LaTeX source for the library uses different macros to enable it to
  7180. be converted to texinfo, and from there to INFO or HTML format so it
  7181. can be browsed as a hypertext.  The net result is that you can now
  7182. read the Python library documentation in Emacs info mode!
  7183.  
  7184.  
  7185. Changes to the source code that affect C extension writers
  7186. ----------------------------------------------------------
  7187.  
  7188. The function strdup() no longer exists (it was used only in one places
  7189. and is somewhat of a a portability problem sice some systems have the
  7190. same function in their C library.
  7191.  
  7192. The functions NEW() and RENEW() allocate one spare byte to guard
  7193. against a NULL return from malloc(0) being taken for an error, but
  7194. this should not be relied upon.
  7195.  
  7196.  
  7197. =========================
  7198. ==> Release 0.9.7beta <==
  7199. =========================
  7200.  
  7201.  
  7202. Changes to the language proper
  7203. ------------------------------
  7204.  
  7205. User-defined classes can now implement operations invoked through
  7206. special syntax, such as x[i] or `x` by defining methods named
  7207. __getitem__(self, i) or __repr__(self), etc.
  7208.  
  7209.  
  7210. Changes to the build process
  7211. ----------------------------
  7212.  
  7213. Instead of extensive manual editing of the Makefile to select
  7214. compile-time options, you can now run a Configure.py script.
  7215. The Makefile as distributed builds a minimal interpreter sufficient to
  7216. run Configure.py.  See also misc/BUILD
  7217.  
  7218. The Makefile now includes more "utility" targets, e.g. install and
  7219. tags/TAGS
  7220.  
  7221. Using the provided strtod.c and strtol.c are now separate options, as
  7222. on the Sun the provided strtod.c dumps core :-(
  7223.  
  7224. The regex module is now an option chosen by the Makefile, since some
  7225. (old) C compilers choke on regexpr.c
  7226.  
  7227.  
  7228. Changes affecting portability
  7229. -----------------------------
  7230.  
  7231. You need STDWIN version 0.9.7 (released 30 June 1992) for the stdwin
  7232. interface
  7233.  
  7234. Dynamic loading is now supported for Sun (and other non-COFF systems)
  7235. throug dld-3.2.3, as well as for SGI (a new version of Jack Jansen's
  7236. DL is out, 1.4)
  7237.  
  7238. The system-dependent code for the use of the select() system call is
  7239. moved to one file: myselect.h
  7240.  
  7241. Thanks to Jaap Vermeulen, the code should now port cleanly to the
  7242. SEQUENT
  7243.  
  7244.  
  7245. Changes to the interpreter interface
  7246. ------------------------------------
  7247.  
  7248. The interpretation of $PYTHONPATH in the environment is different: it
  7249. is inserted in front of the default path instead of overriding it
  7250.  
  7251.  
  7252. Changes to existing built-in functions and methods
  7253. --------------------------------------------------
  7254.  
  7255. List objects now support an optional argument to their sort() method,
  7256. which is a comparison function similar to qsort(3) in C
  7257.  
  7258. File objects now have a method fileno(), used by the new select module
  7259. (see below)
  7260.  
  7261.  
  7262. New built-in function
  7263. ---------------------
  7264.  
  7265. coerce(x, y): take two numbers and return a tuple containing them
  7266. both converted to a common type
  7267.  
  7268.  
  7269. Changes to built-in modules
  7270. ---------------------------
  7271.  
  7272. sys: fixed core dumps in settrace() and setprofile()
  7273.  
  7274. socket: added socket methods setsockopt() and getsockopt(); and
  7275. fileno(), used by the new select module (see below)
  7276.  
  7277. stdwin: added fileno() == connectionnumber(), in support of new module
  7278. select (see below)
  7279.  
  7280. posix: added get{eg,eu,g,u}id(); waitpid() is now a separate function.
  7281.  
  7282. gl: added qgetfd()
  7283.  
  7284. fl: added several new functions, fixed several obscure bugs, adapted
  7285. to FORMS 2.1
  7286.  
  7287.  
  7288. Changes to standard modules
  7289. ---------------------------
  7290.  
  7291. posixpath: changed implementation of ismount()
  7292.  
  7293. string: atoi() no longer mistakes leading zero for octal number
  7294.  
  7295. ...
  7296.  
  7297.  
  7298. New built-in modules
  7299. --------------------
  7300.  
  7301. Modules marked "dynamic only" are not configured at compile time but
  7302. can be loaded dynamically.  You need to turn on the DL or DLD option in
  7303. the Makefile for support dynamic loading of modules (this requires
  7304. external code).
  7305.  
  7306. select: interfaces to the BSD select() system call
  7307.  
  7308. dbm: interfaces to the (new) dbm library (dynamic only)
  7309.  
  7310. nis: interfaces to some NIS functions (aka yellow pages)
  7311.  
  7312. thread: limited form of multiple threads (sgi only)
  7313.  
  7314. audioop: operations useful for audio programs, e.g. u-LAW and ADPCM
  7315. coding (dynamic only)
  7316.  
  7317. cd: interface to Indigo SCSI CDROM player audio library (sgi only)
  7318.  
  7319. jpeg: read files in JPEG format (dynamic only, sgi only; needs
  7320. external code)
  7321.  
  7322. imgfile: read SGI image files (dynamic only, sgi only)
  7323.  
  7324. sunaudiodev: interface to sun's /dev/audio (dynamic only, sun only)
  7325.  
  7326. sv: interface to Indigo video library (sgi only)
  7327.  
  7328. pc: a minimal set of MS-DOS interfaces (MS-DOS only)
  7329.  
  7330. rotor: encryption, by Lance Ellinghouse (dynamic only)
  7331.  
  7332.  
  7333. New standard modules
  7334. --------------------
  7335.  
  7336. Not all these modules are documented.  Read the source:
  7337. lib/<modulename>.py.  Sometimes a file lib/<modulename>.doc contains
  7338. additional documentation.
  7339.  
  7340. imghdr: recognizes image file headers
  7341.  
  7342. sndhdr: recognizes sound file headers
  7343.  
  7344. profile: print run-time statistics of Python code
  7345.  
  7346. readcd, cdplayer: companion modules for built-in module cd (sgi only)
  7347.  
  7348. emacs: interface to Emacs using py-connect.el (see below).
  7349.  
  7350. SOCKET: symbolic constant definitions for socket options
  7351.  
  7352. SUNAUDIODEV: symbolic constant definitions for sunaudiodef (sun only)
  7353.  
  7354. SV: symbolic constat definitions for sv (sgi only)
  7355.  
  7356. CD: symbolic constat definitions for cd (sgi only)
  7357.  
  7358.  
  7359. New demos
  7360. ---------
  7361.  
  7362. scripts/pp.py: execute Python as a filter with a Perl-like command
  7363. line interface
  7364.  
  7365. classes/: examples using the new class features
  7366.  
  7367. threads/: examples using the new thread module
  7368.  
  7369. sgi/cd/: examples using the new cd module
  7370.  
  7371.  
  7372. Changes to the documentation
  7373. ----------------------------
  7374.  
  7375. The last-minute syntax changes of release 0.9.6 are now reflected
  7376. everywhere in the manuals
  7377.  
  7378. The reference manual has a new section (3.2) on implementing new kinds
  7379. of numbers, sequences or mappings with user classes
  7380.  
  7381. Classes are now treated extensively in the tutorial (chapter 9)
  7382.  
  7383. Slightly restructured the system-dependent chapters of the library
  7384. manual
  7385.  
  7386. The file misc/EXTENDING incorporates documentation for mkvalue() and
  7387. a new section on error handling
  7388.  
  7389. The files misc/CLASSES and misc/ERRORS are no longer necessary
  7390.  
  7391. The doc/Makefile now creates PostScript files automatically
  7392.  
  7393.  
  7394. Miscellaneous changes
  7395. ---------------------
  7396.  
  7397. Incorporated Tim Peters' changes to python-mode.el, it's now version
  7398. 1.06
  7399.  
  7400. A python/Emacs bridge (provided by Terrence M. Brannon) lets a Python
  7401. program running in an Emacs buffer execute Emacs lisp code.  The
  7402. necessary Python code is in lib/emacs.py.  The Emacs code is
  7403. misc/py-connect.el (it needs some external Emacs lisp code)
  7404.  
  7405.  
  7406. Changes to the source code that affect C extension writers
  7407. ----------------------------------------------------------
  7408.  
  7409. New service function mkvalue() to construct a Python object from C
  7410. values according to a "format" string a la getargs()
  7411.  
  7412. Most functions from pythonmain.c moved to new pythonrun.c which is
  7413. in libpython.a.  This should make embedded versions of Python easier
  7414.  
  7415. ceval.h is split in eval.h (which needs compile.h and only declares
  7416. eval_code) and ceval.h (which doesn't need compile.hand declares the
  7417. rest)
  7418.  
  7419. ceval.h defines macros BGN_SAVE / END_SAVE for use with threads (to
  7420. improve the parallellism of multi-threaded programs by letting other
  7421. Python code run when a blocking system call or something similar is
  7422. made)
  7423.  
  7424. In structmember.[ch], new member types BYTE, CHAR and unsigned
  7425. variants have been added
  7426.  
  7427. New file xxmodule.c is a template for new extension modules.
  7428.  
  7429.  
  7430. ==================================
  7431. ==> RELEASE 0.9.6 (6 Apr 1992) <==
  7432. ==================================
  7433.  
  7434. Misc news in 0.9.6:
  7435. - Restructured the misc subdirectory
  7436. - Reference manual completed, library manual much extended (with indexes!)
  7437. - the GNU Readline library is now distributed standard with Python
  7438. - the script "../demo/scripts/classfix.py" fixes Python modules using old
  7439.   class syntax
  7440. - Emacs python-mode.el (was python.el) vastly improved (thanks, Tim!)
  7441. - Because of the GNU copyleft business I am not using the GNU regular
  7442.   expression implementation but a free re-implementation by Tatu Ylonen
  7443.   that recently appeared in comp.sources.misc (Bravo, Tatu!)
  7444.  
  7445. New features in 0.9.6:
  7446. - stricter try stmt syntax: cannot mix except and finally clauses on 1 try
  7447. - New module 'os' supplants modules 'mac' and 'posix' for most cases;
  7448.   module 'path' is replaced by 'os.path'
  7449. - os.path.split() return value differs from that of old path.split()
  7450. - sys.exc_type, sys.exc_value, sys.exc_traceback are set to the exception
  7451.   currently being handled
  7452. - sys.last_type, sys.last_value, sys.last_traceback remember last unhandled
  7453.   exception
  7454. - New function string.expandtabs() expands tabs in a string
  7455. - Added times() interface to posix (user & sys time of process & children)
  7456. - Added uname() interface to posix (returns OS type, hostname, etc.)
  7457. - New built-in function execfile() is like exec() but from a file
  7458. - Functions exec() and eval() are less picky about whitespace/newlines
  7459. - New built-in functions getattr() and setattr() access arbitrary attributes
  7460. - More generic argument handling in built-in functions (see "./EXTENDING")
  7461. - Dynamic loading of modules written in C or C++ (see "./DYNLOAD")
  7462. - Division and modulo for long and plain integers with negative operands
  7463.   have changed; a/b is now floor(float(a)/float(b)) and a%b is defined
  7464.   as a-(a/b)*b.  So now the outcome of divmod(a,b) is the same as
  7465.   (a/b, a%b) for integers.  For floats, % is also changed, but of course
  7466.   / is unchanged, and divmod(x,y) does not yield (x/y, x%y)...
  7467. - A function with explicit variable-length argument list can be declared
  7468.   like this: def f(*args): ...; or even like this: def f(a, b, *rest): ...
  7469. - Code tracing and profiling features have been added, and two source
  7470.   code debuggers are provided in the library (pdb.py, tty-oriented,
  7471.   and wdb, window-oriented); you can now step through Python programs!
  7472.   See sys.settrace() and sys.setprofile(), and "../lib/pdb.doc"
  7473. - '==' is now the only equality operator; "../demo/scripts/eqfix.py" is
  7474.   a script that fixes old Python modules
  7475. - Plain integer right shift now uses sign extension
  7476. - Long integer shift/mask operations now simulate 2's complement
  7477.   to give more useful results for negative operands
  7478. - Changed/added range checks for long/plain integer shifts
  7479. - Options found after "-c command" are now passed to the command in sys.argv
  7480.   (note subtle incompatiblity with "python -c command -- -options"!)
  7481. - Module stdwin is better protected against touching objects after they've
  7482.   been closed; menus can now also be closed explicitly
  7483. - Stdwin now uses its own exception (stdwin.error)
  7484.  
  7485. New features in 0.9.5 (released as Macintosh application only, 2 Jan 1992):
  7486. - dictionary objects can now be compared properly; e.g., {}=={} is true
  7487. - new exception SystemExit causes termination if not caught;
  7488.   it is raised by sys.exit() so that 'finally' clauses can clean up,
  7489.   and it may even be caught.  It does work interactively!
  7490. - new module "regex" implements GNU Emacs style regular expressions;
  7491.   module "regexp" is rewritten in Python for backward compatibility
  7492. - formal parameter lists may contain trailing commas
  7493.  
  7494. Bugs fixed in 0.9.6:
  7495. - assigning to or deleting a list item with a negative index dumped core
  7496. - divmod(-10L,5L) returned (-3L, 5L) instead of (-2L, 0L)
  7497.  
  7498. Bugs fixed in 0.9.5:
  7499. - masking operations involving negative long integers gave wrong results
  7500.  
  7501.  
  7502. ===================================
  7503. ==> RELEASE 0.9.4 (24 Dec 1991) <==
  7504. ===================================
  7505.  
  7506. - new function argument handling (see below)
  7507. - built-in apply(func, args) means func(args[0], args[1], ...)
  7508. - new, more refined exceptions
  7509. - new exception string values (NameError = 'NameError' etc.)
  7510. - better checking for math exceptions
  7511. - for sequences (string/tuple/list), x[-i] is now equivalent to x[len(x)-i]
  7512. - fixed list assignment bug: "a[1:1] = a" now works correctly
  7513. - new class syntax, without extraneous parentheses
  7514. - new 'global' statement to assign global variables from within a function
  7515.  
  7516.  
  7517. New class syntax
  7518. ----------------
  7519.  
  7520. You can now declare a base class as follows:
  7521.  
  7522.     class B:            # Was: class B():
  7523.         def some_method(self): ...
  7524.         ...
  7525.  
  7526. and a derived class thusly:
  7527.  
  7528.     class D(B):            # Was: class D() = B():
  7529.         def another_method(self, arg): ...
  7530.  
  7531. Multiple inheritance looks like this:
  7532.  
  7533.     class M(B, D):            # Was: class M() = B(), D():
  7534.         def this_or_that_method(self, arg): ...
  7535.  
  7536. The old syntax is still accepted by Python 0.9.4, but will disappear
  7537. in Python 1.0 (to be posted to comp.sources).
  7538.  
  7539.  
  7540. New 'global' statement
  7541. ----------------------
  7542.  
  7543. Every now and then you have a global variable in a module that you
  7544. want to change from within a function in that module -- say, a count
  7545. of calls to a function, or an option flag, etc.  Until now this was
  7546. not directly possible.  While several kludges are known that
  7547. circumvent the problem, and often the need for a global variable can
  7548. be avoided by rewriting the module as a class, this does not always
  7549. lead to clearer code.
  7550.  
  7551. The 'global' statement solves this dilemma.  Its occurrence in a
  7552. function body means that, for the duration of that function, the
  7553. names listed there refer to global variables.  For instance:
  7554.  
  7555.     total = 0.0
  7556.     count = 0
  7557.  
  7558.     def add_to_total(amount):
  7559.         global total, count
  7560.         total = total + amount
  7561.         count = count + 1
  7562.  
  7563. 'global' must be repeated in each function where it is needed.  The
  7564. names listed in a 'global' statement must not be used in the function
  7565. before the statement is reached.
  7566.  
  7567. Remember that you don't need to use 'global' if you only want to *use*
  7568. a global variable in a function; nor do you need ot for assignments to
  7569. parts of global variables (e.g., list or dictionary items or
  7570. attributes of class instances).  This has not changed; in fact
  7571. assignment to part of a global variable was the standard workaround.
  7572.  
  7573.  
  7574. New exceptions
  7575. --------------
  7576.  
  7577. Several new exceptions have been defined, to distinguish more clearly
  7578. between different types of errors.
  7579.  
  7580. name            meaning                    was
  7581.  
  7582. AttributeError        reference to non-existing attribute    NameError
  7583. IOError            unexpected I/O error            RuntimeError
  7584. ImportError        import of non-existing module or name    NameError
  7585. IndexError        invalid string, tuple or list index    RuntimeError
  7586. KeyError        key not in dictionary            RuntimeError
  7587. OverflowError        numeric overflow            RuntimeError
  7588. SyntaxError        invalid syntax                RuntimeError
  7589. ValueError        invalid argument value            RuntimeError
  7590. ZeroDivisionError    division by zero            RuntimeError
  7591.  
  7592. The string value of each exception is now its name -- this makes it
  7593. easier to experimentally find out which operations raise which
  7594. exceptions; e.g.:
  7595.  
  7596.     >>> KeyboardInterrupt
  7597.     'KeyboardInterrupt'
  7598.     >>>
  7599.  
  7600.  
  7601. New argument passing semantics
  7602. ------------------------------
  7603.  
  7604. Off-line discussions with Steve Majewski and Daniel LaLiberte have
  7605. convinced me that Python's parameter mechanism could be changed in a
  7606. way that made both of them happy (I hope), kept me happy, fixed a
  7607. number of outstanding problems, and, given some backward compatibility
  7608. provisions, would only break a very small amount of existing code --
  7609. probably all mine anyway.  In fact I suspect that most Python users
  7610. will hardly notice the difference.  And yet it has cost me at least
  7611. one sleepless night to decide to make the change...
  7612.  
  7613. Philosophically, the change is quite radical (to me, anyway): a
  7614. function is no longer called with either zero or one argument, which
  7615. is a tuple if there appear to be more arguments.  Every function now
  7616. has an argument list containing 0, 1 or more arguments.  This list is
  7617. always implemented as a tuple, and it is a (run-time) error if a
  7618. function is called with a different number of arguments than expected.
  7619.  
  7620. What's the difference? you may ask.  The answer is, very little unless
  7621. you want to write variadic functions -- functions that may be called
  7622. with a variable number of arguments.  Formerly, you could write a
  7623. function that accepted one or more arguments with little trouble, but
  7624. writing a function that could be called with either 0 or 1 argument
  7625. (or more) was next to impossible.  This is now a piece of cake: you
  7626. can simply declare an argument that receives the entire argument
  7627. tuple, and check its length -- it will be of size 0 if there are no
  7628. arguments.
  7629.  
  7630. Another anomaly of the old system was the way multi-argument methods
  7631. (in classes) had to be declared, e.g.:
  7632.  
  7633.     class Point():
  7634.         def init(self, (x, y, color)): ...
  7635.         def setcolor(self, color): ...
  7636.         dev moveto(self, (x, y)): ...
  7637.         def draw(self): ...
  7638.  
  7639. Using the new scheme there is no need to enclose the method arguments
  7640. in an extra set of parentheses, so the above class could become:
  7641.  
  7642.     class Point:
  7643.         def init(self, x, y, color): ...
  7644.         def setcolor(self, color): ...
  7645.         dev moveto(self, x, y): ...
  7646.         def draw(self): ...
  7647.  
  7648. That is, the equivalence rule between methods and functions has
  7649. changed so that now p.moveto(x,y) is equivalent to Point.moveto(p,x,y)
  7650. while formerly it was equivalent to Point.moveto(p,(x,y)).
  7651.  
  7652. A special backward compatibility rule makes that the old version also
  7653. still works: whenever a function with exactly two arguments (at the top
  7654. level) is called with more than two arguments, the second and further
  7655. arguments are packed into a tuple and passed as the second argument.
  7656. This rule is invoked independently of whether the function is actually a
  7657. method, so there is a slight chance that some erroneous calls of
  7658. functions expecting two arguments with more than that number of
  7659. arguments go undetected at first -- when the function tries to use the
  7660. second argument it may find it is a tuple instead of what was expected.
  7661. Note that this rule will be removed from future versions of the
  7662. language; it is a backward compatibility provision *only*.
  7663.  
  7664. Two other rules and a new built-in function handle conversion between
  7665. tuples and argument lists:
  7666.  
  7667. Rule (a): when a function with more than one argument is called with a
  7668. single argument that is a tuple of the right size, the tuple's items
  7669. are used as arguments.
  7670.  
  7671. Rule (b): when a function with exactly one argument receives no
  7672. arguments or more than one, that one argument will receive a tuple
  7673. containing the arguments (the tuple will be empty if there were no
  7674. arguments).
  7675.  
  7676.  
  7677. A new built-in function, apply(), was added to support functions that
  7678. need to call other functions with a constructed argument list.  The call
  7679.  
  7680.     apply(function, tuple)
  7681.  
  7682. is equivalent to
  7683.  
  7684.     function(tuple[0], tuple[1], ..., tuple[len(tuple)-1])
  7685.  
  7686.  
  7687. While no new argument syntax was added in this phase, it would now be
  7688. quite sensible to add explicit syntax to Python for default argument
  7689. values (as in C++ or Modula-3), or a "rest" argument to receive the
  7690. remaining arguments of a variable-length argument list.
  7691.  
  7692.  
  7693. ========================================================
  7694. ==> Release 0.9.3 (never made available outside CWI) <==
  7695. ========================================================
  7696.  
  7697. - string sys.version shows current version (also printed on interactive entry)
  7698. - more detailed exceptions, e.g., IOError, ZeroDivisionError, etc.
  7699. - 'global' statement to declare module-global variables assigned in functions.
  7700. - new class declaration syntax: class C(Base1, Base2, ...): suite
  7701.   (the old syntax is still accepted -- be sure to convert your classes now!)
  7702. - C shifting and masking operators: << >> ~ & ^ | (for ints and longs).
  7703. - C comparison operators: == != (the old = and <> remain valid).
  7704. - floating point numbers may now start with a period (e.g., .14).
  7705. - definition of integer division tightened (always truncates towards zero).
  7706. - new builtins hex(x), oct(x) return hex/octal string from (long) integer.
  7707. - new list method l.count(x) returns the number of occurrences of x in l.
  7708. - new SGI module: al (Indigo and 4D/35 audio library).
  7709. - the FORMS interface (modules fl and FL) now uses FORMS 2.0
  7710. - module gl: added lrect{read,write}, rectzoom and pixmode;
  7711.   added (non-GL) functions (un)packrect.
  7712. - new socket method: s.allowbroadcast(flag).
  7713. - many objects support __dict__, __methods__ or __members__.
  7714. - dir() lists anything that has __dict__.
  7715. - class attributes are no longer read-only.
  7716. - classes support __bases__, instances support __class__ (and __dict__).
  7717. - divmod() now also works for floats.
  7718. - fixed obscure bug in eval('1            ').
  7719.  
  7720.  
  7721. ===================================
  7722. ==> Release 0.9.2 (Autumn 1991) <==
  7723. ===================================
  7724.  
  7725. Highlights
  7726. ----------
  7727.  
  7728. - tutorial now (almost) complete; library reference reorganized
  7729. - new syntax: continue statement; semicolons; dictionary constructors;
  7730.   restrictions on blank lines in source files removed
  7731. - dramatically improved module load time through precompiled modules
  7732. - arbitrary precision integers: compute 2 to the power 1000 and more...
  7733. - arithmetic operators now accept mixed type operands, e.g., 3.14/4
  7734. - more operations on list: remove, index, reverse; repetition
  7735. - improved/new file operations: readlines, seek, tell, flush, ...
  7736. - process management added to the posix module: fork/exec/wait/kill etc.
  7737. - BSD socket operations (with example servers and clients!)
  7738. - many new STDWIN features (color, fonts, polygons, ...)
  7739. - new SGI modules: font manager and FORMS library interface
  7740.  
  7741.  
  7742. Extended list of changes in 0.9.2
  7743. ---------------------------------
  7744.  
  7745. Here is a summary of the most important user-visible changes in 0.9.2,
  7746. in somewhat arbitrary order.  Changes in later versions are listed in
  7747. the "highlights" section above.
  7748.  
  7749.  
  7750. 1. Changes to the interpreter proper
  7751.  
  7752. - Simple statements can now be separated by semicolons.
  7753.   If you write "if t: s1; s2", both s1 and s2 are executed
  7754.   conditionally.
  7755. - The 'continue' statement was added, with semantics as in C.
  7756. - Dictionary displays are now allowed on input: {key: value, ...}.
  7757. - Blank lines and lines bearing only a comment no longer need to
  7758.   be indented properly.  (A completely empty line still ends a multi-
  7759.   line statement interactively.)
  7760. - Mixed arithmetic is supported, 1 compares equal to 1.0, etc.
  7761. - Option "-c command" to execute statements from the command line
  7762. - Compiled versions of modules are cached in ".pyc" files, giving a
  7763.   dramatic improvement of start-up time
  7764. - Other, smaller speed improvements, e.g., extracting characters from
  7765.   strings, looking up single-character keys, and looking up global
  7766.   variables
  7767. - Interrupting a print operation raises KeyboardInterrupt instead of
  7768.   only cancelling the print operation
  7769. - Fixed various portability problems (it now passes gcc with only
  7770.   warnings -- more Standard C compatibility will be provided in later
  7771.   versions)
  7772. - Source is prepared for porting to MS-DOS
  7773. - Numeric constants are now checked for overflow (this requires
  7774.   standard-conforming strtol() and strtod() functions; a correct
  7775.   strtol() implementation is provided, but the strtod() provided
  7776.   relies on atof() for everything, including error checking
  7777.  
  7778.  
  7779. 2. Changes to the built-in types, functions and modules
  7780.  
  7781. - New module socket: interface to BSD socket primitives
  7782. - New modules pwd and grp: access the UNIX password and group databases
  7783. - (SGI only:) New module "fm" interfaces to the SGI IRIX Font Manager
  7784. - (SGI only:) New module "fl" interfaces to Mark Overmars' FORMS library
  7785. - New numeric type: long integer, for unlimited precision
  7786.     - integer constants suffixed with 'L' or 'l' are long integers
  7787.     - new built-in function long(x) converts int or float to long
  7788.     - int() and float() now also convert from long integers
  7789. - New built-in function:
  7790.     - pow(x, y) returns x to the power y
  7791. - New operation and methods for lists:
  7792.     - l*n returns a new list consisting of n concatenated copies of l
  7793.     - l.remove(x) removes the first occurrence of the value x from l
  7794.     - l.index(x) returns the index of the first occurrence of x in l
  7795.     - l.reverse() reverses l in place
  7796. - New operation for tuples:
  7797.     - t*n returns a tuple consisting of n concatenated copies of t
  7798. - Improved file handling:
  7799.     - f.readline() no longer restricts the line length, is faster,
  7800.       and isn't confused by null bytes; same for raw_input()
  7801.     - f.read() without arguments reads the entire (rest of the) file
  7802.     - mixing of print and sys.stdout.write() has different effect
  7803. - New methods for files:
  7804.     - f.readlines() returns a list containing the lines of the file,
  7805.       as read with f.readline()
  7806.     - f.flush(), f.tell(), f.seek() call their stdio counterparts
  7807.     - f.isatty() tests for "tty-ness"
  7808. - New posix functions:
  7809.     - _exit(), exec(), fork(), getpid(), getppid(), kill(), wait()
  7810.     - popen() returns a file object connected to a pipe
  7811.     - utime() replaces utimes() (the latter is not a POSIX name)
  7812. - New stdwin features, including:
  7813.     - font handling
  7814.     - color drawing
  7815.     - scroll bars made optional
  7816.     - polygons
  7817.     - filled and xor shapes
  7818.     - text editing objects now have a 'settext' method
  7819.  
  7820.  
  7821. 3. Changes to the standard library
  7822.  
  7823. - Name change: the functions path.cat and macpath.cat are now called
  7824.   path.join and macpath.join
  7825. - Added new modules: formatter, mutex, persist, sched, mainloop
  7826. - Added some modules and functionality to the "widget set" (which is
  7827.   still under development, so please bear with me):
  7828.     DirList, FormSplit, TextEdit, WindowSched
  7829. - Fixed module testall to work non-interactively
  7830. - Module string:
  7831.     - added functions join() and joinfields()
  7832.     - fixed center() to work correct and make it "transitive"
  7833. - Obsolete modules were removed: util, minmax
  7834. - Some modules were moved to the demo directory
  7835.  
  7836.  
  7837. 4. Changes to the demonstration programs
  7838.  
  7839. - Added new useful scipts: byteyears, eptags, fact, from, lfact,
  7840.   objgraph, pdeps, pi, primes, ptags, which
  7841. - Added a bunch of socket demos
  7842. - Doubled the speed of ptags
  7843. - Added new stdwin demos: microedit, miniedit
  7844. - Added a windowing interface to the Python interpreter: python (most
  7845.   useful on the Mac)
  7846. - Added a browser for Emacs info files: demo/stdwin/ibrowse
  7847.   (yes, I plan to put all STDWIN and Python documentation in texinfo
  7848.   form in the future)
  7849.  
  7850.  
  7851. 5. Other changes to the distribution
  7852.  
  7853. - An Emacs Lisp file "python.el" is provided to facilitate editing
  7854.   Python programs in GNU Emacs (slightly improved since posted to
  7855.   gnu.emacs.sources)
  7856. - Some info on writing an extension in C is provided
  7857. - Some info on building Python on non-UNIX platforms is provided
  7858.  
  7859.  
  7860. =====================================
  7861. ==> Release 0.9.1 (February 1991) <==
  7862. =====================================
  7863.  
  7864. - Micro changes only
  7865. - Added file "patchlevel.h"
  7866.  
  7867.  
  7868. =====================================
  7869. ==> Release 0.9.0 (February 1991) <==
  7870. =====================================
  7871.  
  7872. Original posting to alt.sources.
  7873.